Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-30-2010, 07:58 PM   PM User | #1
reyna12
New Coder

 
Join Date: Jan 2006
Posts: 88
Thanks: 4
Thanked 1 Time in 1 Post
reyna12 is an unknown quantity at this point
css div background doesnt repeat with content

Hi,

Title might be slightly wrong, it does repeat but only if i set the size, i have set height to 300px to show you. How do i get it to continue repeating with the content that's in the div's which are placed inside it?

http://www.designerhost.co.uk/latics

Many Thanks
reyna12 is offline   Reply With Quote
Old 12-30-2010, 08:08 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello reyna12,
Clear your floats and the container will expand, along with the background image, to enclose it's content. No need for height here.

Try this -
Code:
#contentbg {
	background: url(images/contentbg.png) repeat-y;
	width: 985px;
	margin-top: -40px;
/*height: 300px;*/
overflow: auto;
}
http://www.quirksmode.org/css/clearing.html
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 12-30-2010, 08:11 PM   PM User | #3
reyna12
New Coder

 
Join Date: Jan 2006
Posts: 88
Thanks: 4
Thanked 1 Time in 1 Post
reyna12 is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
Hello reyna12,
Clear your floats and the container will expand, along with the background image, to enclose it's content. No need for height here.

Try this -
Code:
#contentbg {
	background: url(images/contentbg.png) repeat-y;
	width: 985px;
	margin-top: -40px;
/*height: 300px;*/
overflow: auto;
}
http://www.quirksmode.org/css/clearing.html
adding the overflow line just adds scrollbars to the div :S
reyna12 is offline   Reply With Quote
Old 12-30-2010, 08:19 PM   PM User | #4
reyna12
New Coder

 
Join Date: Jan 2006
Posts: 88
Thanks: 4
Thanked 1 Time in 1 Post
reyna12 is an unknown quantity at this point
nevermind, i was using clear but stupidly at the same time as setting the div height. all sorted thanks
reyna12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:14 AM.


Advertisement
Log in to turn off these ads.