Hi
I have a project and have to center the html, with adding in-line css, adding images to the same folder as the htm file.
I have done all this, but the result comes different in firefox. It comes alright in Chrome and Safari.
I have uploaded the site at: http://www.des-us.com/projects/tampacolleen/, with the edits. The original file is at http://www.des-us.com/projects/tampacolleen/orig.
Please check out both htm files, and let me know what I can do to correct it in firefox.
Thanks
Centering an element requires setting a width that is less than 100%, using a proper document type and using the CSS property: margin: 0 auto; This is done in the CSS that styles the element. Example:
Code:
body {
width: 90%;
height: 600px; /* optional */
margin: 0 auto;
background: #fff url(path to non-tiled image) no-repeat center scroll;
}
Change parameters as you need. Set "#fff" to background color you want. Set "scroll" to "fixed" if you want page contents to scroll over background image. CSS was given for an image that does not tile. Doesn't have to be the body tag, but you should get the idea.
I give up. You haven't even tried to make changes, but keep replying with same thing. I'm not going to re-code the entire page for you. You should make the changes and correct the CSS/HTML coding errors to make sure that none of them are causing your problem. Once you've done this, let me know and I'll take another look.
Bookmarks