Go Back   Technibble Forums > Advertising & Marketing > Website Development & SEO

  Technibble Sponsor

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2011, 07:07 PM
codythetech's Avatar
codythetech codythetech is offline
 
Join Date: Aug 2010
Location: Broken Arrow, OK
Posts: 32
codythetech is an unknown quantity at this point
Default I need to extend my div to the height of the page

does anyone know how i can get my div with the black background to always extend the whole height of the screen? right now it looks like this...

Reply With Quote
  #2  
Old 04-18-2011, 10:05 PM
BryanVest BryanVest is offline
Banned
 
Join Date: Jun 2009
Posts: 443
BryanVest is an unknown quantity at this point
Default

In your CSS put this code.

Code:
background-repeat:repeat-y;
*short*
Reply With Quote
  #3  
Old 04-19-2011, 05:55 AM
JosephLeo's Avatar
JosephLeo JosephLeo is offline
 
Join Date: Sep 2009
Posts: 2,146
JosephLeo is on a distinguished road
Default

That might not work Bryan, the background attribute can only extend to the height of the div and no more, and div's don't exactly obey height:100% perfectly.

A better solution might be to do this.

html, body {
height:100%;
}

.divclass {
min-height:100%;
background:#<background>
}

* html .divclass {
height:100%;
}

This should make it work in all modern browsers from IE6 and up. IE5.5- not so sure, but I stopped working with that browser back in '08.
Reply With Quote
  #4  
Old 04-19-2011, 06:27 PM
BryanVest BryanVest is offline
Banned
 
Join Date: Jun 2009
Posts: 443
BryanVest is an unknown quantity at this point
Default

Quote:
Originally Posted by JosephLeo View Post
That might not work Bryan, the background attribute can only extend to the height of the div and no more, and div's don't exactly obey height:100% perfectly.

A better solution might be to do this.

html, body {
height:100%;
}

.divclass {
min-height:100%;
background:#<background>
}

* html .divclass {
height:100%;
}

This should make it work in all modern browsers from IE6 and up. IE5.5- not so sure, but I stopped working with that browser back in '08.
Yeah very true it all depends on how its coded.
Reply With Quote
Reply

Thread Tools
Display Modes

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. The time now is 01:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Technibble.com is based out of MELBOURNE, AUSTRALIA.