| Web Standards Design Discuss accessibility, CSS, XHTML and more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#10 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jan 2004
Lives in Atlanta, GA, USA
Hosted on PASS3
66 posts
Gave thanks: 7
Thanked 0 times
|
The clears and breaks were throwing me off
Hey Dan,
Thanks for the eyeball. I had made some changes to the source before I noticed your post. The thing (for me) with reading up on this stuff is that it is so easy to jump the tracks into the realm of syntactical bullsh*t without noticing! Get a containing div, add two more divs in that parent div, float the children where you want them, define CSS styling for each div using classes that can be tuned by div id and you're done. Apparently simple enough. 3 days later and I'm still trying to figure out how to get stacked child divs heights to take up half of the height space of the parent div. Code:
/* Middle Section */
.middle {
position:relative;
height:430px; /* If set to 100% it will stretch to fit ALL content -not good */
}
.middle .mainpane {
float:left;
width:75%;
overflow:auto;
padding-right:1em;
height:430px; /* Can't this be dyanmic? A percentage? */
}
.middle .submenus {
width:auto;
height:100%; /* Becomes .middle .mainpane height:430px */
overflow:hidden;
}
.middle .submenus .submenu1 {
width:auto;
height:50%; /* Half of the height available to .middle .submenus */
}
.middle .submenus .submenu2 {
width:auto;
height:auto; /* The remainder (should be 50%) of the height available in .submenus after .submenu1 has taken its share */
}
__________________
Server: Pass3 (72.29.75.151) |
|
|
|
|
|
#11 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
.middle has been assigned a height on 5 occasions. Each selector should only have 1 assignment for each property. You can sub reassign individual grouping by using id (#) or element (< >) combined with the class (.)
Code:
#middle.middle {
} /* <div id="middle" class="middle"> /*
#middle.mainpain {
}
div.middle {
} /* <div class="middle"> */
#middle.middle will inherit #middle properties unless individual properties are redefined for this selector combination only, (it will not redefine #middle itself).
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#12 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jan 2004
Lives in Atlanta, GA, USA
Hosted on PASS3
66 posts
Gave thanks: 7
Thanked 0 times
|
Thanks Cowboy,
I've made the changes as best I could figure out. How does it look now? Cheers.
__________________
Server: Pass3 (72.29.75.151) |
|
|
|
|
|
#13 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
Looking good. You might want to add the background color for #submenu2 to your #submenus instead of #fff to extend the background to the bottom.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#14 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
Fuyu, with a bit more time and after digesting your comments in your css and your paragraph before the C&P data in the middle frame, a couple of thoughts.
You question why your %'s don't seem to work: Your main container height is "auto". A % of auto is anything. Set your container to a specific height, then you can use % from then on since there is a constant to take a % of. (You can use code to determine the client window and dynamically set this to their display window.) Your #middle should have the height specified, (you seem to want it about 80% of the container), rather than one of the 2 selectors (.mainpane). The submenus should not be inside the .mainpane, so your .mainpane /div should be before the submenus div. The #submenus and .mainpane can now be set to 100% (of #middle 80% of #container). #submenu2 has to also be 50% to fill the entire 100%. With it set at auto it will automatically stop at the end of the data. Hint: Keeping track of beginning and ending elements can be visualized easier by making a note to yourself including with the canceling tag: Code:
<div id="general" class="specific"> Your content and code </div> <!-- general.specific --> .
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
| This user thanks cowboy for this great post! | Fuyu (May 11th, 2007) |
|
|
#15 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
PS. The scroll bar takes space from the selector. Reduce width to accommodate, or, add overflow property and content to another div inside.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#16 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jan 2004
Lives in Atlanta, GA, USA
Hosted on PASS3
66 posts
Gave thanks: 7
Thanked 0 times
|
Thanks cowboy.
I thought I had it. Bugs were being squashed left and right, positioning falling into place. Soon, in at least 3 countries, spittless elderly ladies would be getting their toy lap dogs to lick the backs of stamps with my face on it (whom else uses stamps any more?). It was awesome. Then, I noticed that somewhere along the way I had exposed a positioning issue that has stamp printers and lickers holding their breath... Padding. Occurs independantly of content flow. Content flow is bounded by the enclosing div. I should use margins to govern the flow and match colored padding to margins to illustrate flow boundaries? Or, get colored box of side x. Layer content box of side x-padding on top? Yikes.
__________________
Server: Pass3 (72.29.75.151) |
|
|
|
|
|
#17 (permalink) | |
|
Registered User
Seasoned Poster
Joined in Jan 2004
Lives in Atlanta, GA, USA
Hosted on PASS3
66 posts
Gave thanks: 7
Thanked 0 times
|
Quote:
Hmm, I may have misunderstood your advice above, If the scrollbar is triggered I can control which div it appears in (#scrollloc?) -it's not an attribute/widget of the div?
__________________
Server: Pass3 (72.29.75.151) |
|
|
|
|
|
|
#18 (permalink) | |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
Quote:
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|