• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:21
CET 01:21
KST 09:21
  • 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
ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (March 9-15): herO, Clem, ByuN win02026 KungFu Cup Announcement5BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains17Weekly Cups (March 2-8): ByuN overcomes PvT block5
StarCraft 2
General
Potential Updates Coming to the SC2 CN Server Weekly Cups (March 2-8): ByuN overcomes PvT block Blizzard Classic Cup - Tastosis announced as captains Weekly Cups (March 9-15): herO, Clem, ByuN win GSL CK - New online series
Tourneys
2026 KungFu Cup Announcement [GSL CK] #2: Team Classic vs. Team Solar [GSL CK] #1: Team Maru vs. Team herO RSL Season 4 announced for March-April PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death Mutation # 515 Together Forever
Brood War
General
ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Gypsy to Korea BSL 22 Map Contest — Submissions OPEN to March 10 Are you ready for ASL 21? Hype VIDEO
Tourneys
ASL Season 21 Qualifiers March 7-8 [Megathread] Daily Proleagues [BSL22] Open Qualifiers & Ladder Tours IPSL Spring 2026 is here!
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Zealot bombing is no longer popular?
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Path of Exile Nintendo Switch Thread PC Games Sales Thread
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
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
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Mexico's Drug War Russo-Ukrainian War Thread NASA and the Private Sector
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread Tokyo Olympics 2021 Thread Formula 1 Discussion General nutrition recommendations Cricket [SPORT]
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 4349 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
Hyrule19196 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
Hyrule19196 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
Hyrule19196 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
Replay Cast
00:00
GSL CK #2
CranKy Ducklings46
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft399
SteadfastSC 121
ProTech59
RuFF_SC2 50
StarCraft: Brood War
GuemChi 2954
Artosis 655
Nal_rA 71
Britney 0
Dota 2
monkeys_forever483
League of Legends
JimRising 633
Counter-Strike
taco 197
Super Smash Bros
hungrybox566
C9.Mang0410
AZ_Axe100
PPMD59
Other Games
summit1g14566
Maynarde130
Trikslyr76
ViBE71
Mew2King22
Organizations
Other Games
gamesdonequick727
Dota 2
PGL Dota 2 - Main Stream311
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• davetesta13
• HeavenSC 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Eskiya23 20
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1237
• imaqtpie1056
Upcoming Events
WardiTV Team League
11h 39m
PiGosaur Cup
23h 39m
Kung Fu Cup
1d 10h
OSC
1d 23h
The PondCast
2 days
KCM Race Survival
2 days
WardiTV Team League
2 days
Replay Cast
2 days
KCM Race Survival
3 days
WardiTV Team League
3 days
[ Show More ]
Korean StarCraft League
4 days
RSL Revival
4 days
Maru vs Zoun
Cure vs ByuN
uThermal 2v2 Circuit
4 days
BSL
4 days
RSL Revival
5 days
herO vs MaxPax
Rogue vs TriGGeR
BSL
5 days
Replay Cast
5 days
Replay Cast
6 days
Afreeca Starleague
6 days
Sharp vs Scan
Rain vs Mong
Wardi Open
6 days
Monday Night Weeklies
6 days
Liquipedia Results

Completed

Proleague 2026-03-15
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
CSL Elite League 2026
RSL Revival: Season 4
Nations Cup 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
Acropolis #4
IPSL Spring 2026
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
NationLESS Cup
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 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.