Grow your CSS skills. Land your dream job.

Don’t get it

  • # March 13, 2010 at 10:53 am

    I have tried, and tried to figure out what I´m doing wrong (probably with the floats).
    There is something really wrong, even in Firefox, with the menu-, main- and sidebar (floats).
    I have been reading about floats and so but at the moment I don´t get the problem… :oops:

    Can somebody help me…? 8-)

    Thanx!!

    Here´s a link to the homepage (and codes) : http://www.bluechalo.com/tindradesign1.3.html

    # March 13, 2010 at 1:37 pm

    Well for one thing you have an extra closing </div> and 2 menus. I’m not sure what you are trying to achieve or which menu you want to use.
    As for floats, whenever you use a float you have to specify a width. The css reset should be *{margin:0; padding:0;} and then you can remove html, body, ul {padding: 0;}

    # March 13, 2010 at 3:15 pm
    "virtual" wrote:
    Well for one thing you have an extra closing </div> and 2 menus. I’m not sure what you are trying to achieve or which menu you want to use.
    As for floats, whenever you use a float you have to specify a width. The css reset should be *{margin:0; padding:0;} and then you can remove html, body, ul {padding: 0;}

    Okey, thanx. It can be, cause I got so angry earlier when nothing worked for me. :?

    Second menu… Don´t get what you mean by that. Is it wrong to put the #menu as I have done now? Should it be #menu, #menu ul, #menu ul li, #menu ul li a, etc? Or why do you say there is two menus? With the * html #menu, I have tried to get IE hack. Perhaps it´s totally wrong? The second menu you´re talking about? :?

    I had it somewhere in my backhead (don´t know if you say so in english as well ;) ) that the floats have to have width. I tried it with width:100%; but it didn´t work as I wanted it. So I skiped it. Shouldn´t have, I see.

    Still don´t get me the answer why the #main popping up besides the #menu (if I for example don´t have enough of padding in #menu li ), or if I put #menu width:100%;?). Meaning, I´ve tried to put #menu {width:100%;}. What else do I then have to change and/or add (not to get collapsing margins/floats)?

    I have been told that you also can let it be like I have the *{margin:0; padding:0;} and html, body, ul {padding: 0;}. Why is it wrong for you? I want to know as many solutions as possible. :)

    # March 14, 2010 at 1:42 pm

    You cannot put 2 sets of menu tags in your CSS, they will conflict with each other. You have to make a separate stylesheet to target the IE version that needs it and only put in that stylesheet the css that is specific to IE. Then link to the stylesheet with an if IE statement. See this
    http://css-tricks.com/how-to-create-an- … tylesheet/

    You can either float your menu li tags or display inline, don’t do both at the same time.

    It is just quicker and easier to use * {margin:0; padding:0;} why write 3 lines of code when 1 will do? Anyway CSS resets are a matter of personal preference, some are more complicated than others. See Eric Meyers
    http://meyerweb.com/eric/tools/css/reset/

    # March 15, 2010 at 9:42 am

    Okey. Now I noticed that I have something wrong with the hole page. I try to put a border to #wrapper, but the border is just surrounding the header and the #menu.
    How to get the rest of the page to be surrounded of the #wrapper border? What have I done wrong? :roll: :oops:

    # March 15, 2010 at 12:41 pm

    Correct the things I pointed out first in the previous posts. You are bound to have problems with conflicting css statements.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".