- This topic is empty.
-
AuthorPosts
-
December 27, 2012 at 1:41 pm #41626Austin_DavisParticipant
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?
December 27, 2012 at 2:37 pm #119136wolfcry911ParticipantOne 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!
December 27, 2012 at 3:05 pm #119138Austin_DavisParticipantThanks I’m glad it was just the a missing closing div. Much appreciated, and I can’t wait for your future suggestions.
December 27, 2012 at 3:35 pm #119142wolfcry911ParticipantOkay, [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
December 27, 2012 at 4:11 pm #119147Austin_DavisParticipantWow, 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.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.