Dreamweaver CS4; space to right of page
White space problem in Dreamweaver CS4 this time. I designed a page with a background image of 1024 x 1024. The page looks fine in the design windo开发者_JAVA百科w. When I preview in browser or upload to server the page has about 200 px of white space to the right. I've set the margins to '0' for the top, left, right and bottom. The space remains. Next instead of using 1024 image as a background image I inserted into an AP Div. Same result. Just for chuckles I went in HTML I changed the margins to 1, I still got 200 px to the right. After much hard work on the site design it's very frustrating to have some mystery element destroy my design. Anyone know how to fix this problem?
Thanks!
Digital D
You may not have the width of that div
set properly. I imagine you would see that in dreamweaver. Perhaps it is just that you haven't properly set the style properly for the background-image
Here's how I would set it for a full background image:
<html>
<head>
<title> Solution</title>
</head>
<body>
<div id="maindiv" style="background-image: url('image.jpg'); background-position: center; background-repeat: no-repeat; background-size: cover;">
<p style="color: white">This is the content of the div </p>
</div>
</body>
</html>
精彩评论