Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Location
    Rio Rancho, New Mexico
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Floated Images not working in Firefox

    I am floating images (either right or left) and they look fine in IE but in FF they shoot down to the bottom of the page. I've messed with the "clear" attribute, looked for inherited values that might be interfering, and more with no results. Here is a sample page where the images are not behaving: District Athletic Page

    Any ideas? Thanks in advance.

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Hi RedBarron
    You have applied clear: right to the second newsblock on your right side. FF will not put any floats that appear later in your document higher up than this element (contrary to IE). This is not a bug in neither IE nor FF---they just happen to deal differently with floats.

    I recommend that you take a look at floated layout using divs. This way you would use 1 div for each column, and no tables. There are plenty of good tutorials in the sticky section.

    Using some of these methods, what you can do for now to fix your document is this. You currently have something like this:
    Code:
    .newsbox {
    	width: 180px;
    	vertical-align: top;
    	text-align: left;
    	margin: 5px 0px 5px 10px;
    	float: right;
    	line-height: 1.50em;
    }
    .newsbox2 {
    	padding: 0px;
    	width: 180px;
    	vertical-align: top;
    	text-align: left;
    	margin: 5px 0px 5px 10px;
    	clear: both;
    	float: right;
    }
    together with this:
    Code:
    <div class="newsbox">
    ...
    </div>
    <div class="newsbox">
    ...
    </div>
    Instead use this:
    Code:
    #right {
            float: right;
    }
    .newsbox {
    	width: 180px;
    	vertical-align: top;
    	text-align: left;
    	margin: 5px 0px 5px 10px;
    	float: left;
    	line-height: 1.50em;
    }
    .newsbox2 {
    	padding: 0px;
    	width: 180px;
    	vertical-align: top;
    	text-align: left;
    	margin: 5px 0px 5px 10px;
    	clear: both;
    	float: left;
    }
    together with this:
    Code:
    <div id="right">
    <div class="newsbox">
    ...
    </div>
    <div class="newsbox">
    ...
    </div>
    </div>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •