Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

div borders weird in Firefox (gecko)

Status
Not open for further replies.

MasterKaos

Programmer
Jan 17, 2004
107
GB
I really tried getting my divs and CSS right the first time, but i can't :-( I even valdiated the HTML and CSS but no errors.


Looks right in IE6 and Opera, but Firefox and other gecko based browsers go all funny and don't display the outer border correctly. I noticed that removing the float:right on the content div makes the container border appear, but of course then the content is in the wrong place.

What am i doing wrong?

What's the best approach to get the layout i am trying to achieve?

Any good tutorials on the box model and how to code for all browsers with compliant CSS you could recommend?

Thanks!!!

----------------------------------------------------------------------------
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
 
Ok i fixed it.

How can i delete my thread?

----------------------------------------------------------------------------
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
 

Instead of deleting the post, why not give the solution that worked for you?

That way, anyone else with a similar problem who reads this thread will have something to try.

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
well i thought since i'd over-written the problem code there was no point, but you're right i should share.

Basically the trick was to insert a
Code:
<div style="clear:both;"></div>

after the end of the divs that did floats but before the end of the container divs with messed up borders.

Also, someone from another forum suggested this link for an explanation of floats and clearing:

----------------------------------------------------------------------------
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top