homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Css Html

Msg#: 4590136 posted 1:54 am on Jul 4, 2013 (gmt 0)

Hello forum. I have inherited a project. It uses CSS to format the body of the web page.

Its appearance needs reworking. Right now it looks like a bock plopped in the middle of the browser window. I want it to have nice borders and a header going across the top and the bottom.

Here is what it looks like now:

Here is what I would like it to look like:

I am not as experienced with CSS as I would like to be. But I was able to dig into the code and find where the html was formatted. I am writing this post now because I would prefer if this design was on a table rather than on the entire HTML page.

The CSS element "html" is defined ni a "main.css" file like this:

html{background-color:#eee;padding:0px;overflow:auto;height:100%;}html body,html form{background-image:url('../images/body-background.gif');
width:1200px;margin:0px auto;box-shadow:0 0 15px 15px #bbbbbb;padding:0px;}
the image
is not the background of the whitespace on the right and left. This gif file is the background of the block in the middle.

So, how do I make this declaration a table declaration instead of a declaration and format for the entire page? And once this change has been made, what sort of corresponding code changes do I need to do in other code files?

[edited by: phranque at 6:54 am (utc) on Jul 8, 2013]
[edit reason] no photobucket links - please see the CSS forum Charter [/edit]



WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4590136 posted 3:44 am on Jul 4, 2013 (gmt 0)

Can you rephrase the question in a way that doesn't put the words "prefer" and "format" and "table" into the same sentence? :(

If you want a background-image to apply to the entire page, with no whitespace, you have to attach it to the <body> element. (Just to confuse you, the word "margin" has a different meaning when applied to the body than it does anywhere else in CSS.)


Msg#: 4590136 posted 4:10 am on Jul 8, 2013 (gmt 0)

Thanks Lucy. This, I think, as put me on a better path and I seem to be making some progress, now.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved