Home > Web Front-end > HTML Tutorial > How to achieve '100%' width and height of the page in Div? _html/css_WEB-ITnose

How to achieve '100%' width and height of the page in Div? _html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:02:55
Original
1494 people have browsed it

How to achieve "100%" width and height of Div page? ? ?

Now there is a page with two "Div".

The first Div is "100%" height and width, and its background is a solid color. Hope it can be displayed in full screen according to the size of the screen.

.tyeet_login
{
height:100%;
width:100%;
background-color:#3c611a;
}


The second Div is the main form of the login box, and the background is a picture. Hopefully it will appear centered horizontally and vertically in the first layer.

.tyeet_login_mindle
{
background:url(image/login.gif);
width:800px;
height:600px;
}


HTML:

Related labels:
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