[SOLVED] Problem with float - In mozilla

This is a discussion on "[SOLVED] Problem with float - In mozilla" within the Web Page Design section. This forum, and the thread "[SOLVED] Problem with float - In mozilla are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 19th, 2007, 10:54
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

  #2 (permalink)  
Old Oct 19th, 2007, 11:51
AdRock's Avatar
SuperMember

SuperMember
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with float - In mozilla

Is it hosted anywhere so we can see the problem?
Reply With Quote
  #3 (permalink)  
Old Oct 19th, 2007, 11:56
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with float - In mozilla

It has to do with clearing floats

Add overflow: hidden to #maindiv{ }
Reply With Quote
  #4 (permalink)  
Old Oct 19th, 2007, 13:16
Emzi's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Manchester
Age: 25
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with float - In mozilla

Try adding display:table to the maindiv
Reply With Quote
  #5 (permalink)  
Old Oct 20th, 2007, 06:11
Junior Member
Join Date: Jan 2006
Location: India
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problem with float - In mozilla

Hi all,

Sorry for very late response... I tried adding overflow: hidden to #maindiv{ }...Its working fine now Thanks a lot karinne. I will be coming up with few more doubts

Thanks
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Seeing Image In Mozilla Geeky Girl Graphics and 3D 10 Mar 23rd, 2008 01:21
[SOLVED] Another problem with mozilla thewebkid Web Page Design 12 Nov 29th, 2007 14:39
Problem with image in Mozilla ?? please help DavidinLondon JavaScript Forum 1 May 20th, 2006 16:03
odd slideshow problem (fine in IE, not in Mozilla) jono JavaScript Forum 7 Mar 17th, 2005 08:42
IE/Mozilla problem crip Web Page Design 1 Feb 12th, 2004 18:33


All times are GMT. The time now is 10:42.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43