• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:54
CET 14:54
KST 22:54
  • 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
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation13Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Zerg is losing its identity in StarCraft 2 [TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BGH Auto Balance -> http://bghmmr.eu/ What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Clair Obscur - Expedition 33 Should offensive tower rushing be viable in RTS games? Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2241 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
Hyrule19153 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
Hyrule19153 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
Hyrule19153 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
WardiTV Korean Royale
12:00
Group Stage 1 - Group A
WardiTV559
LiquipediaDiscussion
Kung Fu Cup
12:00
2025 Monthly #3: Day 5
Cure vs herOLIVE!
Reynor vs TBD
RotterdaM693
TKL 366
IndyStarCraft 269
SteadfastSC122
IntoTheiNu 43
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 617
TKL 352
Tasteless 324
Reynor 276
IndyStarCraft 269
Rex 147
SteadfastSC 113
Railgan 25
MindelVK 21
StarCraft: Brood War
Britney 36790
Rain 8932
Sea 4139
firebathero 4096
BeSt 1748
Horang2 1687
GuemChi 939
Soma 605
EffOrt 552
Stork 500
[ Show more ]
Mini 456
actioN 283
Rush 225
Killer 174
Last 146
Hyun 144
scan(afreeca) 136
hero 133
Bonyth 99
Mind 90
Barracks 61
Sharp 51
zelot 50
yabsab 49
Sea.KH 45
sorry 42
Snow 39
sas.Sziky 24
Shinee 18
Hm[arnc] 15
NaDa 8
Bale 6
Dota 2
singsing3070
qojqva1678
Dendi1083
Gorgc737
XcaliburYe301
Counter-Strike
byalli539
x6flipin531
Heroes of the Storm
Khaldor238
Liquid`Hasu193
Other Games
FrodaN4939
B2W.Neo1844
Pyrionflax359
Fuzer 256
KnowMe216
DeMusliM40
Organizations
Dota 2
PGL Dota 2 - Main Stream14873
PGL Dota 2 - Secondary Stream1808
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Adnapsc2 8
• Dystopia_ 6
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV606
• Ler66
Upcoming Events
BSL 21
6h 6m
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
6h 6m
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
9h 6m
Wardi Open
22h 6m
Monday Night Weeklies
1d 3h
Replay Cast
1d 9h
WardiTV Korean Royale
1d 22h
BSL: GosuLeague
2 days
The PondCast
2 days
Replay Cast
3 days
[ Show More ]
RSL Revival
3 days
BSL: GosuLeague
4 days
RSL Revival
4 days
WardiTV Korean Royale
4 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
IPSL
6 days
Julia vs Artosis
JDConan vs DragOn
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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 © 2025 TLnet. All Rights Reserved.