View Single Post
  #1 (permalink)  
Old Oct 19th, 2007, 10:54
jram jram is offline
Junior Member
Join Date: Jan 2006
Location: India
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Problem with float - In mozilla

I have a very basic doubt using float property. Here is my CSS Code:

#maindiv{width:800px;border:#7F7F7F 1px solid;margin:0 auto;}
.contdiv1{float:left;width:500px;padding:20px 5px 10px 25px;border:1px #990033 solid;}
.contdiv2{float:right;width:180px;padding:20px 25px 10px 5px;border:1px #990033 solid;}

and my HTML:

<div id="maindiv">
<div class="contdiv1">float left</div>
<div class="contdiv2">float right</div>
</div>

Now, the problem is:
I should get the border for the entire content. But its not showing border around the 2 DIVs which is placed inside the main div. Actually I have defined the border for the main div also. I can see the border, but thats showing as a line above ".contdiv1 and 2". I dont have this problem with IE. Is that something wrong with my code or is there any alternate for this?

Please help me!!!
Reply With Quote