#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    Tallinn, Estonia
    Posts
    34
    Rep Power
    11

    problem with CSS float attribute in NS


    Hi.
    I was developing a website . I decided to use float in order to align content on my webpage. Everything worked fine in IE but when I viewed page in NS then linkbar and main area that supposed to be aligned correctly, where collided together.
    The link to this webpage is: http://www.itcollege.ee/~rbomberg/hagerel/index.php

    If viewed in NS then you should notice that the links on the left are not aligned properly and main body text is also dislocated.
    The CSS file used for this website is available at:
    http://www.itcollege.ee/~rbomberg/hagerel/test.css

    Thanks for all the help.
  2. #2
  3. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,938
    Rep Power
    4033
    You should probably just make the links display as block elements. That may fix the problem.

    HTML
    Code:
    <div id="links">
    <a href='index.php?id=1'>Esileht</a>
    <a href='index.php?id=2'>Firmast</a>
    <a href='index.php?id=4'>Projekteerimine</a>
    <a href='index.php?id=5'>Tehtud tööd</a>
    <a href='index.php?id=6'>Kontakt</a> 
    </div>
    <div id="maintext">
    Tere tulemast <b>OÜ Hagereli</b> koduleheküljele. Siit leiate informatsiooni valgustuspaigaldiste
     projekteerimise, skeemide koostamise ja muu eelnevaga seotud kohta. Valige kõrvalolevatest viidetest
    meelepärane ja saate lisainformatsiooni teid huvitava valdkonna kohta.</div>
    
    </div>

    CSS (guess)
    Code:
    div#links {
            float: left;
            width: 10%;
    }
    
    div#links a {
        display: block;
    }
    
    div#maintext {
        float: right;
    }
    [/code]
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    The problem is that the container for the links is too narrow. IE improperly widens the container so you don't know it's screwed up. Moz/Netscape properly allow the overflow break out.

    While writing a test case, I got carried away and rewrote the html and css as a bare-bones valid page. For some reason I can't attach files tonight, so it's on my site http://garyblue.port5.com/webdev/hagerel/index.php.html.This will be deleted after a few days.

    The html needs a proper lang= and encoding.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    Tallinn, Estonia
    Posts
    34
    Rep Power
    11
    Thanks for the help.


    take care.

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo