Howdy I have a simple question, but am hopeless at CSS. Can someone please tell me how to make the background of the widgets (in the left side bar) of this site black please? http://tshirtalert.com/tweets/ Thanks so much Jake
uh, even after turning on Javascript, I don't think I'm seeing the page the way you expect. I'm getting a MySpace visual here. Can you post a screenshot and circle what you mean? The left side looks pretty blackish from over here.
current code #sidebar { float:left; } Code (markup): new code #sidebar { float:left; [COLOR="Red"] background:#000000;[/COLOR] } Code (markup): Looks like you may have to add in a clearfix too because your div isn't spanning as far as it should.
Thanks dude - it's one step closer - have a look now. But the sidebar now needs to be a smidgen wider, how do I do that? And how do I get it to extend to the bottom bottom of the sidebar?
Any bored CSS gurus out there? I'd love a litttle assistance regarding the above, if possible please? I'm trying to get the left sidebar on www.tshirtalert.com/tweets to extend a little further to the right, and further down the page, in order to cover all of the text and images contained within the sidebar. But alas, I'm hopeless at CSS
Overflow was no good, it caused an extra scroll bar to appear, kind of like an iframe. Instead, I just deleted the set height of the sidebar (it was set to 400 pixels high), and made the image within the sidebar narrower, instead of trying to make the sidebar expand to the width of the image
The reason people offered the overflow: auto is because if your sidebar had been static and had floats inside it, then setting a background colour on it wouldn't show up. Setting overflow (anything other than the default of visible) will make a box wrap its children. But since your sidebar was already floated it didn't have that problem. Everything inside the sidebar could have been floated and it wouldn't have mattered because floats wrap floats in every case : ) Having a set height on anything is generally a bad idea because then it can't grow with the content. However next time, if you have a static (non-floated) box with floats in it and the background isn't showing up, you can try overflow: hidden (so long as you don't have a set height) instead of "auto". Auto gives you the scrollbars you see if the content inside is wider than your stated width or taller than your stated height... but you would not have seen scrollbars with "auto" if you hadn't had the set height. Now I have to go look at your site again to see what you were talking about... everything was already black the first time I looked.