-
Why isn't my background black?
I was trying to make a black background, with a white wrapper.
http://japantown.awardspace.com/divdesign.shtml
-
-
I think it is black, but you just can't see it because the other colors are covering it up. You can specify a height (for example 100%) to make it fill the whole screen. Or as you add content it will automatically expand.
You can also change the body margins to remove the white edges if you'd like.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
The Following User Says Thank You to djr33 For This Useful Post:
Johnnymushio (03-24-2011)
-
i thought by specifying in the body for a black background color, it would make everything that is white on my page now, black.
how would i do that then?
-
-
that's actually kinda odd.
I think Daniel's right about the <body> "shrinking" -or more accurately, "not expanding"- around the content (0 margin or 100% height/width won't make it cover the page because the root (html) element doesn't have a set width).
In all cases, html{ background: black; } should solve things. In Firefox, simply setting the html{} selector (with no rules) will trigger the black background.
As I said, odd. I think this has something to do with how the Initial Containing Block and/or the Canvas inherit properties (they inherit certain properties "backwards," more or less). It's an interesting subject, but I haven't got my head quite around it yet.
-
The Following 2 Users Say Thank You to traq For This Useful Post:
djr33 (03-24-2011),Johnnymushio (03-24-2011)
-
ok that worked, but is there any reason why the corners are not rounded off?
EDIT
hm, nevermind. when i set the html background to black, it worked. but i also had to set the body background to black or else everything turned white.
the corners were rounded, but i had to get rid of the background colors for each of the three divs.
-
-
Thanks for adding that, traq. Using the html element's CSS is definitely the right answer, since body can't be easily set to 100% in case it might be more than 100% if it's a tall page.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks