Forums

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

Home Forums CSS Div won’t respond to a specific change in margins

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

    I’m trying to change my footers margin so that it expands to the width of the webpage, instead it still seems to be affect by the 50px of left/right margin I added to my #content section. What property am I missing here so I can remove the affect of the content margins on my footer section?

    http://codepen.io/Austin-Davis/pen/rLeEi

    #119136
    wolfcry911
    Participant

    One of your closing divs was missing the backslash, which meant that two divs (the original #note and the one created by mistake) were not closed, effectively forcing the #footer into the #content.

    I’m going to clean things up and make some suggestions in a following post – stay tuned!

    #119138
    Austin_Davis
    Participant

    Thanks I’m glad it was just the a missing closing div. Much appreciated, and I can’t wait for your future suggestions.

    #119142
    wolfcry911
    Participant

    Okay, [here it is.](http://codepen.io/wolfcry911/pen/LlBHF “”)

    I see you’ve used box-sizing: border-box; which isn’t bad, but I feel you should learn the box model in and out before using this (it has no effect on anything you’ve done thus far), so I’ve eliminated it.

    I cleaned up the #header area. I eliminated a lot of unnecessary divs, and to be honest I could eliminate #mast and #below-mast, but kept them there for the time being.

    Classing a div as a header in place of using a header is bad both semantically and for SEO. I changed them all to actual hx tags.

    I’ve used unordered and definition lists for the pricing – it could definitely be argued that a table is appropriate, but in either case it’s better than just a plain div (which holds no semantic value at all).

    Don’t wrap a p in a div just to give a class or id, simply apply it to the p instead.

    Don’t use break tags for creating spaces – use margins or padding instead.

    I used an unordered list for the footer nav – I think you’ll agree it’s much cleaner

    #119147
    Austin_Davis
    Participant

    Wow, Ya its much better cleaner, I think it’s just since I starting using css I fixated on using it wherever I could, and started to neglect html. Also thanks for the pointing out how div crazy I was getting.

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