div css fixed width and centered text left aligned_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:49
Original
1603 people have browsed it

Method 1:

/* CSS Document */

body,html{
margin:0px;
padding:0px;
text-align:center;
background:#e9fbff;
}
#container{
position:relative;
margin:0px;
padding:0px;
width :700px; /*Must have width otherwise it cannot be aligned*/
text-align:left;
background:url(container_bg.jpg) repeat-y;
}

Method 2:

/* CSS Document */

body,html{
margin:0px;
padding:0px;
background:#e9fbff ;
}
#container{
position:relative;
left:50%;
width:700px;
margin-left:-350
margin:0px;
background:url(container_bg.jpg) repeat-y;
}
#banner{
margin:0px;
padding:0px;
}
#links{
font-size:12px;
margin:-18px 0px 0px 0px;
padding:0px;
position:relative;
}

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