Old 15-03-2008, 15:45   #1 (permalink)
RaelRode
Designers are strange :)
 
RaelRode's Avatar
 
Join Date: Jan 2007
Location: Shrewsbury, UK
Posts: 1,703
Send a message via ICQ to RaelRode Send a message via AIM to RaelRode Send a message via MSN to RaelRode Send a message via Yahoo to RaelRode Send a message via Skype™ to RaelRode
Full height DIV -- CSS

Hey guys.

I just had a PSD - xHTML job to do, and there's something that is really annoying me!

I have two (2), DIVs. A left one and a right one. They're both of different heights and both have a background colour of white. The annoying thing is, because they are different heights, the smaller one shows the background colour of grey (grey is the colour of the whole template), so I've got grey boxes all over the place.

I've tried putting the height at 100%, but that does bugger all. Google hasn't helped either.

Heres the CSS Code.

The left div has the content div in it, because of the last revision, it isn't needed but I can't be arsed to remove it.

Code:
#left { height: 100%; background-color: #FFFFFF; float: left; width: 677px; padding: 10px; } #right { height: 100%; background-color: #FFFFFF; float: left; width: 300px; margin-left: -35px; } #content { margin: 0 0 0 0; width: 600px; }

All comments are helpful.

** I have also tried putting a DIV around both these DIVs with a white background, but that didn't work either!
__________________
If it works, it's valid.
  Reply With Quote
Old 15-03-2008, 15:58   #2 (permalink)
Mongoose
Senior Member
 
Mongoose's Avatar
 
Join Date: Oct 2007
Location: Olympia, WA
Posts: 151
Send a message via AIM to Mongoose
Why exactly do you have a gray background? I don't totally understand what you're going for.

If you want both columns to extend down the full length of the page, try faux columns.
__________________
  Reply With Quote
Old 15-03-2008, 16:11   #3 (permalink)
RaelRode
Designers are strange :)
 
RaelRode's Avatar
 
Join Date: Jan 2007
Location: Shrewsbury, UK
Posts: 1,703
Send a message via ICQ to RaelRode Send a message via AIM to RaelRode Send a message via MSN to RaelRode Send a message via Yahoo to RaelRode Send a message via Skype™ to RaelRode
The grey background is the colour of the background of the template. The content area has a white background.

Am trying that faux column thing. Not worked so far though.
__________________
If it works, it's valid.
  Reply With Quote
Old 15-03-2008, 16:20   #4 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
This sounds incredibly simple. Can you post an image of what you're trying to create? Are you trying to create a single white column the full height of the page? Why not apply a background image to the body?

What's with the negative margin on #right?
  Reply With Quote
Old 15-03-2008, 16:30   #5 (permalink)
RaelRode
Designers are strange :)
 
RaelRode's Avatar
 
Join Date: Jan 2007
Location: Shrewsbury, UK
Posts: 1,703
Send a message via ICQ to RaelRode Send a message via AIM to RaelRode Send a message via MSN to RaelRode Send a message via Yahoo to RaelRode Send a message via Skype™ to RaelRode
The negative margin was because there was an overlap between the two columns. So I fixed it.

You can see a screenshot of the site and what's wrong with it.


Thanks
Attached Thumbnails
full-height-div-css-picture-3.png  
__________________
If it works, it's valid.
  Reply With Quote
Old 15-03-2008, 16:50   #6 (permalink)
MJ07
rock me
 
MJ07's Avatar
 
Join Date: Apr 2007
Location: Midlands
Posts: 41
You could put left and right in a container div. Add a footer div below left and right but within the container. CSS from there should be quite simple.

There are many workarounds but I always go with the footer one as its pretty failsafe for me, across different browsers/platforms.
  Reply With Quote
Old 15-03-2008, 16:55   #7 (permalink)
RaelRode
Designers are strange :)
 
RaelRode's Avatar
 
Join Date: Jan 2007
Location: Shrewsbury, UK
Posts: 1,703
Send a message via ICQ to RaelRode Send a message via AIM to RaelRode Send a message via MSN to RaelRode Send a message via Yahoo to RaelRode Send a message via Skype™ to RaelRode
I have done it with the container div around the two columns. Worked this time!!

Thanks for the input nevertheless.
__________________
If it works, it's valid.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8