![]() |
![]() |
![]() |
||||
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 |
Guest
Posts: n/a
|
![]() I have a layout with the following structure:
Code:
#page { background-color:#000000; width: 780px; margin: 0px; padding: 0px; } #content { width: 650px; height: 500px; background-color: #FFFFFF; padding: 0px; margin: 0px; float: right; } #sidebar { width: 130px; height: 450px; background-color:#666666; padding: 0px; margin: 0px; float: right; } Code:
<div id="page"> <div id="content">/*some content*/</div> <div id="sidebar">/*navigation*/</div> </div> Any idea how to make it dependable? I've been trying hard to figure it out, can't seem to do it. Perhaps the float attibutes cause it not to have any influence on the parent layer? :chomp: Thanks guys! |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Feb 2004
Location: Ohio, US
Posts: 662
|
it's because when you float elements (eg: #content #sidebar) it gets taken out of the normal flow of the page, your best bet is to put another div around those two, float it left, and set clear: both on it and that should do it, if not, try setting clear: both; on #content as well
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Guest
Posts: n/a
|
interesting. excuse my ignorance, but what does clear: do?
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: May 2001
Posts: 2,944
|
Part of the problem is you are using zero margins and float right for both inner elements. Take a look at http://www.thenoodleincident.com/tut...son/boxes.html
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Guest
Posts: n/a
|
that didn't work out... sucks! I think I will be better off just positioning the layers with position: relative; to the page layer and that should do the trick no?
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Guest
Posts: n/a
|
brilliant, I totally forgot about it. I set the margin-left on the content layer (floated right) to 130px and voila! it worked!
Thanks guys a lot |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Feb 2005
Location: Haarlem and Amsterdam, capital of the porn world ;-)
Posts: 6,496
|
uhm wanted to post something but the tread is allready anwserd
![]()
__________________
Need adult hosting? Contact us! ![]() WARM Hosting Need an IT solution? or someone to check your site and security? Nossie - IT Professional |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Guest
Posts: n/a
|
http://www.positioniseverything.net/easyclearing.html
That was exactly the problem I ran into! Fixxxxxed... thanks guys |
![]() ![]() ![]() ![]() ![]() |