Reply
DIV Hieght *%
Old 02-15-2008, 11:59 AM DIV Hieght *%
Extreme Talker

Posts: 202
I currently have two divs with their height set to 100%.

This is working OK.

But what I would like is another two divs that run across the top and the bottom of the page that are 10px heigh.

I would like the height of the other two divs to vertically fill the space between the top and bottom divs.

Is this possible?

I tried height: *% but it didnt not work.

Thanks.

<-------------- horizontal div 1: height: 10px ------------->
<- vertical div1: height: *% -><- vertical div 2: height: *%>
<-------------- horizontal div 2: height: 10px ------------->
__________________
JF Web Design
Joe3000 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 02-15-2008, 02:38 PM Re: DIV Hieght *%
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Quote:
I tried height: *% but it didnt not work.
That's because it's NOT VALID. You can't just make up your own rules.

If you've got both of the vertical divs set to height: 100%, then they will do just that, and push the bottom horizontal down.

If that's not what's happening, then lets see the code - all of it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-15-2008, 03:37 PM Re: DIV Hieght *%
Extreme Talker

Posts: 202
That is what is happening but I was hoping there might be a way to have them 100% -10px + -10px.

I guess frames are the only way?
__________________
JF Web Design
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 02-15-2008, 06:32 PM Re: DIV Hieght *%
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Are you gonna add content to these 10px divs. If not use margins.

Code:
margin-top: 10px; margin-bottom:10px;
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-17-2008, 10:35 AM Re: DIV Hieght *%
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Frames are BAD, definitely not a good solution.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-17-2008, 11:40 AM Re: DIV Hieght *%
Extreme Talker

Posts: 202
Are they that bad though?
__________________
JF Web Design
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 02-17-2008, 11:55 AM Re: DIV Hieght *%
Super Talker

Posts: 138
Name: Josh
vertical div1 {height: 100%; width: 50%;}
vertical div2 {height: 100%; width: 50%;}
horizontal div1 {height: 10px; width: 100%;}
horizontal div1 {height: 10px; width: 100%;}

If you want to change the width's then the vertical div's width's will be add up to equal the same amount as the width of 1 horizontal div.

so u could have:

vertical div1 {height: 100%; width: 300px;}
vertical div2 {height: 100%; width: 100px;}
horizontal div1 {height: 10px; width: 400px;}
horizontal div1 {height: 10px; width: 400px;}

or:

vertical div1 {height: 100%; width: 200px;}
vertical div2 {height: 100%; width: 200px;}
horizontal div1 {height: 10px; width: 400px;}
horizontal div1 {height: 10px; width: 400px;}

or anything you want as long as the width of both vertical div's add up to the width of 1 horizontal div.


(have i answered your question or have i misunderstood?)
Joshy D is offline
Reply With Quote
View Public Profile
 
Old 02-18-2008, 02:40 PM Re: DIV Hieght *%
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Quote:
Are they that bad though?
Yes, they are THAT bad !

http://www.webaccessstrategies.com/b...rames-are-bad/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to DIV Hieght *%
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16011 seconds with 12 queries