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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-18-2005, 03:39 PM   #1
X37375787
Guest
 
Posts: n/a
CSS question

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;
}
Inside the body tags, I placed the following code:

Code:
<div id="page">

<div id="content">/*some content*/</div>
<div id="sidebar">/*navigation*/</div>

</div>
Now I am running in the following troubles. As you can see, the parent layer (page) has a black background, the others are white and grey, respectively. I would like the parent (background) layer to grow with the navigation/content layers, dependent on which layer is higher/taller... get the idea? Thus far, the parent layer "page" does not show at all, neither does its black background.

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!
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 03:56 PM   #2
Intrigue
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
Intrigue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 03:58 PM   #3
X37375787
Guest
 
Posts: n/a
interesting. excuse my ignorance, but what does clear: do?
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 04:01 PM   #4
jayeff
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
jayeff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 04:02 PM   #5
X37375787
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?
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 04:05 PM   #6
X37375787
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
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 04:24 PM   #7
PussyTeenies
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
PussyTeenies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-18-2005, 04:34 PM   #8
X37375787
Guest
 
Posts: n/a
http://www.positioniseverything.net/easyclearing.html

That was exactly the problem I ran into! Fixxxxxed... thanks guys
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.