Home > Web Front-end > HTML Tutorial > How to make DIV width not limited by body? _html/css_WEB-ITnose

How to make DIV width not limited by body? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:06
Original
1695 people have browsed it

How to make the width of DIV not limited by the body?

My body has set the bandwidth to 1000px

There is a background at the bottom of the column, but the bottom div is restricted by the body.

#bottom{width:100%;position: relative;bottom:20px;height:135px;background:url(bottom_bg.jpg) repeat-x;z-index:-100;}
Copy after login


Reply to discussion (solution)

What are the restrictions. . What effect do you want. .

Do not set the width of the body. Use a wrapper layer to set the width. It has good compatibility. You won't have the problems you have now.

Do not set the width of the body. Use a wrapper layer to set the width. It has good compatibility. You won't have the problems you have now.
That can solve the problem. The key is to write the body width when doing it before. Now the website has been revised to make the bottom part an adaptive banner. The bottom div is limited by the body width. If I apply the wrapper now, it will be impossible to change it on every page. Is there any way to

If it is just a background image, set it to html

. This is a bit painful. . . It is still recommended to reduce the width of the body and then add a div and add a style.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template