Dreamweaver CS4;页面右侧的空间

发布于 2024-08-11 07:22:09 字数 308 浏览 4 评论 0原文

这次 Dreamweaver CS4 中的空白问题。我设计了一个背景图像为 1024 x 1024 的页面。该页面在设计窗口中看起来不错。当我在浏览器中预览或上传时 为了服务器,页面右侧有大约 200 px 的空白。我已将边距设置为“0” 顶部、左侧、右侧和底部。空间依然存在。接下来,我没有使用 1024 图像作为背景图像,而是将其插入到 AP Div 中。相同的结果。只是为了搞笑,我在 HTML 中将边距更改为 1,但右侧仍然有 200 px。经过大量艰苦的网站设计工作后,一些神秘元素破坏了我的设计,这真是令人沮丧。有人知道如何解决这个问题吗?

谢谢!

数码数码

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 window. 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见你 2024-08-18 07:22:09

您可能没有正确设置该 div 的宽度。我想您会在 Dreamweaver 中看到这一点。也许只是您没有正确设置背景图像的样式

以下是我为完整背景图像设置的方法:

<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>

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文