scampsall — 2011-03-16T06:46:16-04:00 — #1
... cos I'm an idiot.
So, I'm just trying to make a simple template for a site I'm building for a charity. It just has a <header>, a <menubar>, and then a <main> content area with a <sidebar>. All this in a <wrapper> on top of a <background> div. Simple.
So why wont my chosen tone of silver-gray background color extend down the whole page?!! It only reaches down to the menubar and wont underlay the main content area although everything is inside the <background> div and it should stretch to fit, no?
I've hosted it here with all the content removed for ease of pointing out what fundamentally stupid mistake I'm making - please help!:
zbing — 2011-03-16T06:51:17-04:00 — #2
Probably because you have floated elements in there.
try adding overflow: hidden; to the background rule.
zbing — 2011-03-16T06:53:26-04:00 — #3
Just looked at your code and i have a question/suggestion:
Do you really mean to have the background wrap around the content area?
Would'nt it look nicer if you applied the background stuff to the page body?
scampsall — 2011-03-16T08:06:16-04:00 — #4
As I suspected, I am an idiot!
...pride damaged, job done. (I'm still a novice - that's my excuse and I'm sticking to it!)
scallioxtx — 2011-03-16T08:12:51-04:00 — #5
^ There's no u in background-colour.
CSS uses American spelling
scampsall — 2011-03-16T08:27:49-04:00 — #6
ah, yeah, I know - maybe I'm just a colonialist at heart
I'd typed the code up in my message rather than copy and paste, so don't worry, it's all good. No doubt there'll be plenty of time for pulling hair over missing letters and punctuation as time goes by... :sick:
scallioxtx — 2011-03-16T09:01:47-04:00 — #7
I'd recommend you get an editor that "knows" CSS and can point out to you when you're making errors. For example I use NetBeans and if I type background-colour in there I get a yellow zigzag line under it (like Word does when you make errors) and when I hover it it says "Unknown property background-colour".
Saves me a lot of time (and hair!)
scampsall — 2011-03-16T09:24:58-04:00 — #8
I'm using MS Sharepoint, which is pretty good for someone at my level and has the advantage of being free! The hair pulling moments come as it's the 2007 edition, so doesn't cotton on to some newer changes, plus I believe it carries over lots of IE glitches being from the same stable. It's working for me for now though.
Thanks for the tip