Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
HTML
Problem with Centering a website
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="saz, post: 1574632"] Ed: I've seen your business site, and you claim to specialize in website repair...you need to sharpen your skills. Without discussing the deprecated element, the correct format is: align="center" (note the quotes) But that's still the wrong answer. The correct css is: body { background-image: url(img00000.jpg); background-position: center; background-repeat: no-repeat; background-color: #999999; margin-left: 1.79in; margin-right: 1in; margin-bottom: 1in; } Note that I added the one line - background-position: center; If desired, continue to modify background-position to achieve the distance from the top. For example, changing it to: background-position: center 100px; would place the background image in the center 100px from the top of the page. I would also discourage the use of "in" for text placement. Use percentages, em or pixels and margin:auto; when possible. Using "in" will not give the desired effects in different resolutions. Better yet - use a container div (not a table) to center all the text within the image. It will give much cleaner code, especially if you plan on going back in to make updates on a regular basis. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
HTML
Problem with Centering a website
Top