• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 17:43
CET 23:43
KST 07:43
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Rongyi Cup S3 - Preview & Info3herO wins SC2 All-Star Invitational14SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0
Community News
Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win3Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)38
StarCraft 2
General
StarCraft 2 not at the Esports World Cup 2026 Weekly Cups (Jan 19-25): Bunny, Trigger, MaxPax win Oliveira Would Have Returned If EWC Continued herO wins SC2 All-Star Invitational PhD study /w SC2 - help with a survey!
Tourneys
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) OSC Season 13 World Championship $70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 510 Safety Violation Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained
Brood War
General
Potential ASL qualifier breakthroughs? BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Bleak Future After Failed ProGaming Career [ASL21] Potential Map Candidates
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 Azhi's Colosseum - Season 2 [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Simple Questions, Simple Answers Zealot bombing is no longer popular? Current Meta Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Battle Aces/David Kim RTS Megathread Path of Exile Nintendo Switch Thread Mobile Legends: Bang Bang Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Canadian Politics Mega-thread European Politico-economics QA Mega-thread
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
How Esports Advertising Shap…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1676 users

html css div help tt - Page 2

Blogs > alffla
Post a Reply
Prev 1 2 3 Next All
FranzP
Profile Joined November 2010
France270 Posts
May 06 2011 12:21 GMT
#21
I guess for the content you can just put padding top et left so that your text is placed properly inside your image and what shaannn said put your image as a background in the css image and write in the div.

It's totally possible to have a scroll bar in the content div. Just fixed its size with a height attribute in the css, maybe you'll have to toy with the overflow attribut in your style.

And one more advice. Don't use ids for all your div (or others) use classes when you have one style for many different elements.
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
May 06 2011 12:21 GMT
#22
ohh omg awesome i can't think you enough for all the help :D::D:D
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
MasterOfChaos
Profile Blog Joined April 2007
Germany2896 Posts
May 06 2011 12:21 GMT
#23
I think a content box like in your image is a bad idea. Especially with only the box content scrolling. I'd rather make the high of the box adapt to the amount of content in it, and then scroll the whole page.
LiquipediaOne eye to kill. Two eyes to live.
FranzP
Profile Joined November 2010
France270 Posts
May 06 2011 12:22 GMT
#24
On May 06 2011 21:18 shannn wrote:
Show nested quote +
On May 06 2011 21:12 alffla wrote:
oo ok sweet yea i got that background thing done now haha :D
haha tofucake im so far down this road i can't turn back now >_>

its possible to have a scroll bar inside the contentdiv right ? :O

and its easy to embed content inside?

To use scroll bar you gotta use overflow:hidden; in the content div with the attached background image.
This way you'll need to set a specific height for the content div.
Then in HTML you just set content or other images in the content div. This way when you get more text it will show the scroll bar else it will just show the image.


overflow:hidden will hide the scroll bar, didn't you mean overflow:auto.
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
FranzP
Profile Joined November 2010
France270 Posts
May 06 2011 12:25 GMT
#25
On May 06 2011 21:21 MasterOfChaos wrote:
I think a content box like in your image is a bad idea. Especially with only the box content scrolling. I'd rather make the high of the box adapt to the amount of content in it, and then scroll the whole page.


Yeah but you can't stretch your background image for that you have to divide your image in three. One top part one middle part set on repeat-y and the bottom part. And with the irregular left and right border it can be a pain in the ass...
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
shannn
Profile Blog Joined May 2010
Netherlands2891 Posts
Last Edited: 2011-05-06 12:29:25
May 06 2011 12:28 GMT
#26
On May 06 2011 21:22 FranzP wrote:
Show nested quote +
On May 06 2011 21:18 shannn wrote:
On May 06 2011 21:12 alffla wrote:
oo ok sweet yea i got that background thing done now haha :D
haha tofucake im so far down this road i can't turn back now >_>

its possible to have a scroll bar inside the contentdiv right ? :O

and its easy to embed content inside?

To use scroll bar you gotta use overflow:hidden; in the content div with the attached background image.
This way you'll need to set a specific height for the content div.
Then in HTML you just set content or other images in the content div. This way when you get more text it will show the scroll bar else it will just show the image.


overflow:hidden will hide the scroll bar, didn't you mean overflow:auto.

Ya I didn't meant hidden. Auto is best to use but if he wants scroll bar then scroll it is.

I said the same thing like Master to not use that content image box.
It's best to use some separate divs in which u have 3 divs (1 for the top border, 1 for the content and 1 for the bottom). So that when you have more text then the box will just automatically resize to the amount of text you have and then you won't need to use overflow.

On May 06 2011 21:25 FranzP wrote:
Show nested quote +
On May 06 2011 21:21 MasterOfChaos wrote:
I think a content box like in your image is a bad idea. Especially with only the box content scrolling. I'd rather make the high of the box adapt to the amount of content in it, and then scroll the whole page.


Yeah but you can't stretch your background image for that you have to divide your image in three. One top part one middle part set on repeat-y and the bottom part. And with the irregular left and right border it can be a pain in the ass...

Haven't seen the image in detail but if it's irregular then it won't work :D
http://www.teamliquid.net/forum/viewpost.php?post_id=6321864 Epic post.
FranzP
Profile Joined November 2010
France270 Posts
Last Edited: 2011-05-06 12:34:15
May 06 2011 12:32 GMT
#27
edit (that part is useless ^^) : Yeah but in that case you'll have a 1px high middle image for continuity and you can't have irregular border without doing something complicated. Unless I'm missing a way to make repeat-y continuous with big image or something.

Well the content div is the div with box with irregular border no ? Or I missed something

overflow:scroll will always show the scroll even if there is nothing to scroll for.
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
shannn
Profile Blog Joined May 2010
Netherlands2891 Posts
May 06 2011 12:55 GMT
#28
On May 06 2011 21:32 FranzP wrote:
edit (that part is useless ^^) : Yeah but in that case you'll have a 1px high middle image for continuity and you can't have irregular border without doing something complicated. Unless I'm missing a way to make repeat-y continuous with big image or something.

Well the content div is the div with box with irregular border no ? Or I missed something

overflow:scroll will always show the scroll even if there is nothing to scroll for.

I just thought of a normal border and didn;t look at the image that specifically at the borders when I wrote my post which MasterofChaos probably did the same.

And yes I'm aware of the scroll part so I just didn't think things through so I just said scroll.
I did say that auto is best though :p
http://www.teamliquid.net/forum/viewpost.php?post_id=6321864 Epic post.
emucxg
Profile Blog Joined May 2007
Finland4559 Posts
May 06 2011 13:47 GMT
#29
http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt2.html

the link u gave us is pretty awsome l0l
FranzP
Profile Joined November 2010
France270 Posts
Last Edited: 2011-05-06 14:11:09
May 06 2011 14:10 GMT
#30
By the way w3school is not really a reference for css. Not saying it's a bad website but it's not a reference (see http://w3fools.com/ for some corrections on w3school content)
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
May 06 2011 14:14 GMT
#31
hmm haha wow so much feedback in my blog now thanks guys ;D:D:

hm.. so how would i go about making a dynamic content box that enlarges itself depending on how much content i put in? :S that would be even more awesome but i'm afraid i have no idea how to make it ..

wouldn't i need a repeating tile pattern for the background to expand on and everything :S
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
tofucake
Profile Blog Joined October 2009
Hyrule19191 Posts
May 06 2011 14:21 GMT
#32
On May 06 2011 21:12 alffla wrote:
oo ok sweet yea i got that background thing done now haha :D
haha tofucake im so far down this road i can't turn back now >_>

its possible to have a scroll bar inside the contentdiv right ? :O

and its easy to embed content inside?


overflow: auto;
or
overflow: scroll;

Either would work. Example:

/* menu stuff */

#content
{
position: absolute;
left: 150px;
top: 200px;
width: 400px;
height: 800px;
overflow: auto;
}


<div id="menustuff"> <!-- menu stuff here etc --></div>
<div id="content">
<!-- CONTENT HERE -->
</div>


Obviously you'd have to adjust the positions and sizes, but it's fairly easy.
Liquipediaasante sana squash banana
tofucake
Profile Blog Joined October 2009
Hyrule19191 Posts
May 06 2011 14:30 GMT
#33
On May 06 2011 23:14 alffla wrote:
hmm haha wow so much feedback in my blog now thanks guys ;D:D:

hm.. so how would i go about making a dynamic content box that enlarges itself depending on how much content i put in? :S that would be even more awesome but i'm afraid i have no idea how to make it ..

wouldn't i need a repeating tile pattern for the background to expand on and everything :S

Now that I've read further, no. You use more divs! For the upper and lower borders you use background-image: url('borderx.png'); backround-repeat: repeat-x; and similar for the vertical with repeat-y. For corners you can either overlap or you can have special corner pieces (if you need to).
Liquipediaasante sana squash banana
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
Last Edited: 2011-05-06 14:49:37
May 06 2011 14:40 GMT
#34
hhmm .. ok . well not really getting how that works right now but i'll think about it tonight, thanks

don't get why i need an upper border? wouldn't i just need a 'lower' section that repeats as it expands lower and lower? :S

and how do the corners work? shouldn't the 'borders' fill up the entire width anyway?

oh right you're talking about that box that i drew ohh i get it i think hahah :D:D:D
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
tofucake
Profile Blog Joined October 2009
Hyrule19191 Posts
May 06 2011 14:50 GMT
#35
If you have sharp corners, it's no problem. If you want rounded corners or something fancy like that, you have to use CSS3 (incomplete and not fully supported) or special corner images. If you want to have the expanding box box, you need to set the borders for the top and bottom so they stretch out accordingly, and the sides so they stretch vertically. You can also set min and max height and width values and an overflow: scroll to get the scroll when necessary, and to make sure stuff doesn't stretch the content box to insane sizes.
Liquipediaasante sana squash banana
Byte
Profile Joined April 2010
Germany11 Posts
May 06 2011 15:04 GMT
#36
On May 06 2011 19:47 shannn wrote:
fuck IE6 :< I'm always FML when I start on it

Anyways @OP
If I read your post correctly then you just inserted an image in your div with the content image am I right?

You should use CSS to use it as a background without repeating the image.
Then you can just add text in that div with the background image.

And use float for both div in which the navigation and the content is in.
Use another div beneath the navigation and content div to clear since you almost always want to use clear after using floated divs.

So key words are which you should look up at w3schools (linked above by 2pac as well) which will probably what you want:

CSS float
CSS clear
CSS background

I guess that's it :p

From a webdesign perspective. I don't like it that you used a box as content. Because now you will have limited space in a div unless you use overflow but then it'll make it ugly as you'll see scroll bars in the content div.

Happy to give some advice and hope it helped :p


^ that's how I would do it. Alternatively while you are reading up on positioning you schould come across something called a z-index. It allows you to have elements over top of one another.
Ganz oder garnicht! ps. I read you like a book!
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
May 06 2011 15:18 GMT
#37
hi

so basically this is how i should aarrange some new div images to repeat and expand? am i on the right track?

thanks, TL rocks man.

[image loading]
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
FranzP
Profile Joined November 2010
France270 Posts
May 06 2011 15:19 GMT
#38
<div class=contentTop>
</div>
<div class=content>
write your content here
</div>
<div class=bottom>
</div>


now the css :

.contentTop {
background-image:url(url to the top part of the background);
}
.content {
background-image:url(url to 1px high image that will repeat verticaly);
background-repeat:repeat-y;
padding-left:15px; //so that your text won't be on top of the border
}
.contentBottom {
background-image:url(url to the bottom part of the background);
}


With this your content box will bea extendable but you won't be able to have irregular border on the right side and the left side.
"Cyberhacking is kind of like masturbation I guess, all countries do it but nobody actually talks about it. China just was accidentally doing it with the door wide open." Newbistic
alffla
Profile Blog Joined November 2005
Hong Kong20321 Posts
May 06 2011 15:29 GMT
#39
^ wow awesome thanks, i'm going to try that in a sec :D:D
Graphicssavior[gm] : What is a “yawn” rape ;; Masumune - It was the year of the pig for those fucking defilers. Chill - A clinic you say? okum: SC without Korean yelling is like porn without sex. konamix: HAPPY BIRTHDAY MOMMY!
emucxg
Profile Blog Joined May 2007
Finland4559 Posts
May 06 2011 15:30 GMT
#40
css is so much harder to read than java( or python or c++) l0l
Prev 1 2 3 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 13h 17m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech132
CosmosSc2 59
StarCraft: Brood War
Shuttle 359
Dota 2
BeoMulf26
League of Legends
C9.Mang0144
Counter-Strike
minikerr23
Super Smash Bros
PPMD39
Other Games
tarik_tv5337
summit1g3002
Grubby2157
mouzStarbuck276
Liquid`Hasu273
ArmadaUGS116
Mew2King85
Dewaltoss69
Livibee58
KnowMe40
Liquid`Ken4
Organizations
StarCraft 2
angryscii 39
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• mYiSmile1107
• StrangeGG 78
• Hupsaiya 67
• musti20045 32
• Reevou 2
• davetesta1
• IndyKCrew
• AfreecaTV YouTube
• intothetv
• Kozan
• sooper7s
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• blackmanpl 62
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Doublelift2358
• imaqtpie2286
• Shiphtur382
Upcoming Events
HomeStory Cup
13h 17m
Korean StarCraft League
1d 4h
HomeStory Cup
1d 13h
Replay Cast
2 days
HomeStory Cup
2 days
Replay Cast
3 days
Replay Cast
4 days
Wardi Open
4 days
WardiTV Invitational
5 days
The PondCast
6 days
[ Show More ]
WardiTV Invitational
6 days
Liquipedia Results

Completed

Proleague 2026-01-28
OSC Championship Season 13
Underdog Cup #3

Ongoing

CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
Acropolis #4 - TS4
Proleague 2026-01-29
Rongyi Cup S3
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025

Upcoming

Escore Tournament S1: W6
Escore Tournament S1: W7
Acropolis #4
IPSL Spring 2026
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
LiuLi Cup: 2025 Grand Finals
HSC XXVIII
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.