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 3 of 3

Thread: Float Problem

  1. #1
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts

    Float Problem

    Here is a link to my page:

    removed

    This page has a container, and then 2 columns floated side by side, and then a single column spanning the full length at the bottom. Problem I'm having is with the right hand div. If I put a div inside it, it doesn't seem to keep to the flow I desire. The ul and table elements seem to position just fine. If I throw in a div or a span element they just push all the way left. You will see that the table housing "hi" displays just fine. But the timestamp, which is supposed to display where the hi is, doesn't seem to take.

    I can't post the code to the whole page as there is a lot of asp in it but the html in question is on line 837 once displayed. This only happens in FF and Moz, I'll re-tackle IE once it looks right in them.

    Edit: You will see this also happens when I float a div with a nested table on the bottom column. The table is properly positioned, but the div (you can see it's border) is off to the left.
    I'm sure it's something Mozilla does that I'm not used to, I usually just have IE to worry about. Any insight would be appreciated.

    Edit: Okay, seems in Moz I have to float the next element too, but only on certain elements. An explanation as to why would still be apreciated.


    Thanks,

    Basscyst
    Last edited by Basscyst; 07-21-2005 at 01:33 AM.
    Helping to build a bigger box. - Adam Matthews

  • #2
    New Coder
    Join Date
    Jul 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am receiving an asp error message when attempting to open this page:

    Active Server Pages error 'ASP 0126'

    Include file not found

    /adam/pricefinalCSS.asp, line 124

    The include file 'Top_Nav.asp' was not found.


    Try updating these include files and post a link when that's done.

  • #3
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    I got this fixed. I just had to float the div housed in the floated container.

    ex.
    Code:
    #main_div_left (left container)
    {
    	float:left;
    }
    #main_div_right (right container)
    {
    	
    }
    
    (These are in the right container)
    #div1
    {
    	float:left;
    }
    #div2
    {
    	float:left;
    }
    
    <div id="main_div_left ">
    </div>
    <div id="main_div_right">
     <div id="div1">
     </div>
     <div id="div2">
     </div>
     <table>  <--will be properly positioned without float:left
     </table>
     <ul> <--will be properly positioned without float:left
     </ul>
    </div>
    Only certain elements required me to float an element housed in the second container. A table for example would be properly positioned without floating it left. So really my question now is, why. What is different from a table or ul as compared to a div or span which do require the float when in a container floating left of the container set to float left. Does that make sense? Link has been removed, don't need it up.

    Basscyst
    Last edited by Basscyst; 07-21-2005 at 01:43 AM.
    Helping to build a bigger box. - Adam Matthews


  •  

    Posting Permissions

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