Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering Div and Other Potential Problems

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33318
    LaurelBrittany
    Participant

    I’m working a redesign for my mom’s site and this is my first time designing with CSS. This is the design that I created:

    http://theavocadogirl.com/ideamarketers/

    These two pages will be includes on the index.html:
    http://theavocadogirl.com/ideamarketers/nav.htm
    http://theavocadogirl.com/ideamarketers/footerhome.html

    First, the nav page has a horizontal scroll bar unless I use overflow-x: hidden;. I’m not sure why it does this. Second, I wasn’t sure how to center the main div: div#container. I floated it to the left with a left margin. Is there any better way to do this? I feel like the content is centered on the index page, but not on the nav page.

    Also, do you see any other potential problems with the way I coded this?

    Thank you!

    #82624
    wolfcry911
    Participant

    the body on the nav page is wide because the social stuff is overflowing its container. I’d put an overflow: hidden; on .socialbox or get a handle on its children. you can then remove the overflow-x: hidden from body

    #82637
    wolfcry911
    Participant

    it has nothing to do with clearing floats. the children are over-flowing in width, not height

    #82745
    LaurelBrittany
    Participant

    Thank you guys so much for the help! The margin: 0 auto; and overflow:hidden on the social bar worked great!!

    I ran the index.html through an html validator and it said it had 21 errors :/. 20 of them were about having duplicate ids, which I changed to class. That leaves one html error at line 275. It says I shouldn’t have a unordered list within an unordered list. Is there any other way to have a sub list?

    As for my CSS I had a lot of warnings come back with no errors on the site you suggested, sl1dr. I don’t understand some of them, such as don’t “use ids in selectors.” I’m not sure what that means. For example, I changed div#container to #container. And it still came back with this message o.O.

    Thank you!

    Laurel

    #82758
    LaurelBrittany
    Participant

    Aa, so they are fussing at me for styling IDs? Thanks for translating that for me XD.
    Thank you for all your help ^.^!!!

    Here is what my mom and I have so far:
    http://www.ideamarketers.com/index-beta2.cfm

    Not sure what’s going on with the footer stopping early. And I need to get the borders on the articles to go down the page. We’re getting closer XD.

    Take care!

    Laurel

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.