|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Arrgghhhhhh... Any CSS "experts" around?
I need all 3 "boxes" to be the same height and it can't be fixed as the content can vary. The "container" doesn't even have a fucking height.
Code:
<div style="width:750px;border:1px solid black;"> <div style="width:520px;float:left;text-align:left;padding:5px;border-right:1px solid black;"> content </div><div style="width:200px;float:right;text-align:center;"> content </div> </div> |
|
|
|
|
|
#2 |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
How can they all be the same height but not be fixed at the same time? Not much support for min-height out there.
Maybe I'm just not understanding what you're trying to do. Is this a 3 column layout?
__________________
★★★
|
|
|
|
|
|
#3 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
2 column... IF I set the container height to a fixed value, then I can set the 2 column heights to 100% and it works (except some browsers slow way down). The problems appears to be that the container doesn't auto set it's height based on the content columns.
|
|
|
|
|
|
#4 |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
So a header and 2 columns?
__________________
★★★
|
|
|
|
|
|
#5 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Dude.. I posted the exact code.. a container div to set the width and 2 floating divs inside of it.
eg: Code:
<div class="container"> <div class="content"> <!-- content column floats left --> </div> <div class="nav"> <!-- navigation column floats right --> </div> </div> <!-- end of container --> |
|
|
|
|
|
#6 |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
Code:
#wrapper {
width: 750px;
}
#left {
width: 500px;
float: left;
}
#right {
width: 250px;
float: left;
}
Code:
<div id = "wrapper"> <div id = "left"> </div> <div id = "right"> </div> </div> I could be way off. Thats a simple two column layout. Again. I'd need to see an example to know what you're talking about. my apologies
__________________
★★★
|
|
|
|
|
|
#7 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
The nav needs position: absolute;
Make sure you add at least <br style="clear:both;" /> or another div after the two columns.
__________________
It's all disambiguation ![]() |
|
|
|
|
|
#8 |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
Code:
body {
min-height: 100%;
}
#wrapper {
width: 750px;
margin-left: 200px;
min-height: 100%;
overflow:hidden;
}
the wrapper should now auto adjust its height depending on the content in left and right. again. a little tired.
__________________
★★★
|
|
|
|
|
|
#9 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
My notes say absolute, but my blog us using relative.. So the absolute is to place a div, so use relative with the float tag.
__________________
It's all disambiguation ![]() |
|
|
|
|
|
#10 |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
Shit. Ignore the shit I added to the wrapper
Here goes the full code for a 2 Column Layout with an auto-adjusting wrapper/container. Code:
<style type="text/css">
body {
min-height: 100%;
}
#wrapper {
width: 750px;
margin-left: 200px;
background-color:#000099;
min-height: 100%;
overflow:hidden;
}
#left {
width: 500px;
float: left;
}
#right {
width: 250px;
float: left;
}
</style>
<body>
<div id = "wrapper">
<div id = "left">
left
</div>
<div id = "right">
right
</div>
</div>
__________________
★★★
|
|
|
|
|
|
#11 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
ok cool... it appears that just using the overflow
But.. and I've tried all sorts of things to set the "height", the navigation div still won't fill the entire height of the wrapper (which gets pushed by the content column). |
|
|
|
|
|
#12 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
The reason I need the nav column to be the full height is because it's a different background color.
|
|
|
|
|
|
#13 | |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
Quote:
thats the easiest solution.
__________________
★★★
|
|
|
|
|
|
|
#14 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Yep.. I realized after I posted I could switch things around and set some backgrounds to get the effect I want.. Thanks.
|
|
|
|
|
|
#15 | |
|
Bland for life
Industry Role:
Join Date: Nov 2004
Posts: 10,468
|
Quote:
If you want to get to the bottom of this problem for future layouts check out this page. http://www.pmob.co.uk/temp/2colcentred_contentfirst.htm I hate using hacks because I still don't have a complete grasp of them. Even just now when I was digging through my completed layouts to find a solution for you I found myself lost in my own code. Good luck
__________________
★★★
|
|
|
|
|
|
|
#16 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
No easy solution for this, that's for sure. You can use javascript to do it too, but it doesn't work if js is off of course.
__________________
It's all disambiguation ![]() |
|
|
|
|
|
#17 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Well it's lookin all purty now... as long as the content box is higher than the nav box.. LOL... Good enough for now... Thanks guys..
|
|
|
|