View Full Version : divs different in different browsers
Hey, I've been making this site and the divs do crazy things in Firefox.
Can anyone tell me what's going on?
Thanks to anyone that has any advise, or even just directions to an appropriate tutorial.
Peace out,
dog
http://www.futuretechnology.com.br/getpage/Untitled-2.htm
jscheuer1
04-21-2006, 06:30 PM
When you have a division with position:absolute; the proper way of rendering it inside of another element is to NOT add any height or width to that container. IE usually ignores this, whereas FF does it right. Either redesign your page with no, or much less position:absolute; styling, or add the appropriate height and width attributes or styling to the container(s).
hey thanks for the advise.
I think i'm having problems because I want to place two divs side by side inside the same container. Yet i want the height of the container to be defined by the divs inside it.
How do I do this whilst maintaining flexibility?
Peace,
dog
jscheuer1
04-21-2006, 08:21 PM
Don't use absolute positioning, objects will wrap if the container isn't wide enough, forcing the container to be higher if it has no height set. If the container's width is relative to the window, this should all work out in most cases. Some elements can be absolute or floated but if they are, make sure there is enough static content in the container to fill out the container to its desired height.
Cool! Thanks again for the help.
Don't use absolute positioning, objects will wrap if the container isn't wide enough,
I've tried to prevent this but defining width in ems. I'm really keen to make a site with ultimate flexibility but I get the impression I'm doing something very wrong.
The thing i'm stuck on is making a site with multiple columns.
Right now I feel like the only way to make a second column is with floating or absolute positioning, but then it can't have more height than the first. There must be a better tableless way.
Where might I learn more about all this?
mwinter
04-22-2006, 10:35 AM
Right now I feel like the only way to make a second column is with floating or absolute positioning, but then it can't have more height than the first. There must be a better tableless way.Use the clear property on the first non-floated element that follows your columns to push it down, below them. It won't matter which is longer; the cleared element will follow both.
Where might I learn more about all this?There are numerous layout examples on the Web that you can apply. Some of the better ones can be found in the Techniques section of the CSS Zen Garden's CSS Resources (http://www.mezzoblue.com/zengarden/resources/) document.
Mike
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.