CSS Sidebar Background |
For a list of all requirements and guidelines pertaining to posting a new Help topic, please click here.
This Month's Contests | Staff Member of the Month | Hosts Looking for Hostees | Hostees looking for Hosts | BigBookofResources
Submission Guidelines
CSS Sidebar Background |
Aug 13 2010, 11:34 AM
Post
#1
|
|
Mel Blanc was allergic to carrots. Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
So, I'm working on a redesign, and I ran into a little problem. I have a sidebar that has a repeating background. This background is supposed to run down the entire page length. And, I thought it did. Now, I realized if the content is longer than my sidebar, the background gets cut off. Not only that, but on higher resolutions, the background also gets cut off. I usually don't have a CSS problem, but I'm stumped.
Basically, this is what I have: CODE div#sidebar { background: url('images/sidebar.png') repeat-y top left; width: 280px; height: 100%; } That does kind of like how I want it to, but not quite the result I want. I've tried removing the height property, and that kind of worked as well but still, not good enough. I tried setting the html and body tags to a height of 100%, but no dice. Any ideas? |
|
|
Aug 16 2010, 06:20 AM
Post
#2
|
|
Mel Blanc was allergic to carrots. Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
Nope, didn't work either. Anyway, I have to use a strict DOCTYPE because I'm using Cufon for rendering a font and the line-height was a bitch. So, according to their API, line-height wouldn't work without a strict DOCTYPE. Oh well.
Anyway, I kind of just gave up on this. I threw in a little jQuery to fix it. CODE $height = $(document).height(); $('#sidebar').css('height', $height); Not a biggie, so whatever. Y'all can close this. |
|
|