Two full-height columns

Reply

Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Two full-height columns

 
0
  #1
Mar 17th, 2009
I need to have my background image span the entire length of the page without using the BODY element, here's why: I separated the image into left and right sections so even for different resolutions, the left image will always be on the left, and same with the right. Because of this, I have to use two DIVs, each with one part of the image. The problem is, I haven't seen any way to get them to span the entire height of the page. Setting width: 100%; only sets these to 100% of the viewport. Any ideas?

Edit: here is the CSS I currently have (for those specific parts):
  1. .bodyContent .bg_l
  2. {
  3. position: absolute;
  4. z-index: -1;
  5. top: 0px;
  6. left: 0px;
  7. height: 100%;
  8. width: 500px;
  9. background-image: url('http://img22.imageshack.us/img22/2778/bgl.jpg');
  10. background-repeat: repeat-y;
  11. }
  12. .bodyContent .bg_r
  13. {
  14. position: absolute;
  15. z-index: -1;
  16. top: 0px;
  17. right: 0px;
  18. height: 100%;
  19. width: 500px;
  20. background-image: url('http://img15.imageshack.us/img15/5810/bgrf.jpg');
  21. background-repeat: repeat-y;
  22. }

Edit again: I just realized that in IE (horrible thing that it is) the background won't span any of the page except for a small, ~15px part at the top. If you want to take a look at this, here is the page.
Last edited by death_oclock; Mar 17th, 2009 at 6:09 pm.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Two full-height columns

 
0
  #2
Mar 19th, 2009
0px is an invalid style. Never attach a unit of measure to a 0 value. It invalidates the entire style.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: Two full-height columns

 
0
  #3
Mar 19th, 2009
Not really. Removing the "px" changes nothing. And 0px really doesn't make sense to you? How else should you remove a border inherited from lower down in the cascade?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Two full-height columns

 
0
  #4
Mar 24th, 2009
Originally Posted by death_oclock View Post
Not really. Removing the "px" changes nothing. And 0px really doesn't make sense to you? How else should you remove a border inherited from lower down in the cascade?
It's not me that does the complaining. it's the browser. Firefox will throw away any style that contains 0 with a unit of measure attached (such as 0px, 0% 0pt). You have to put just the 0, with no unit of measure:

HTML and CSS Syntax (Toggle Plain Text)
  1. .mystyle [margin: 0;]

Border prefers the "none" attribute, rather than 0, if there is to be no border at all.

But margin and padding do not know the "none" attribute. You have to use 0 with them.
Last edited by MidiMagic; Mar 24th, 2009 at 7:08 pm.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC