padding-left指左边的内边距, 3px就是3像素 ,加‘*’号是针对IE 6 的样式,其他浏览器无效”
使用案例:
p
{
padding-left:2cm;
}
日常修改中发现,底部foot上修改了居中显示,但是两边的空白不一样多的情况,这种时候一般是因为foot上整体样式采用了样式框架,修改框架中css的左边内距离的值为0px后,再居中就可以了。
使用前代码中看的是居中,但是显示到浏览器还是2边不一样多的空白出现。
<DIV class=foot style="clear:both">
<DIV class=foot_text>
<!--<DIV class=foot_text_left><IMG src="images/tel_pic.jpg" width=245
height=113></DIV>-->
<DIV class=foot_text_right> <P align="center" class=p2><A href="/">网站首页</A>|<A
href="about.asp">公司简介|<A
href="fuwu.asp">服务|<A
href="NewsList.asp">新闻中心|<A
href="dljz.asp">记账|<A
href="ly.asp">在线留言|<A
href="lx.asp">联系我们</P>
<P align="center" class=p3><%=WebConfig("WebName")%> 电话:<%=WebConfig("Car")%> 邮箱:<%=WebConfig("Email")%></P> <P align="center" style="padding-top:10px;">友情链接:<% With Rs .Open"Select * From H_Link Where type='hangye' Order By [Id] asc",Conn(),1,1 For i=1 To .Recordcount If .Eof Then Exit For %> <a href="<%=Rs("URL")%>" target="_blank"><%=Rs("Title")%></a> | <% .Movenext Next .Close End With %></P> </DIV>
</DIV>
</DIV>
以下展示样式文件中,注意padding-left 值修改为0px
BODY {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: #666; FONT-SIZE: 12px; PADDING-TOP: 0px
}
P {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: #666; FONT-SIZE: 12px; PADDING-TOP: 0px
}
SPAN {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: #000000; FONT-SIZE: 12px; PADDING-TOP: 0px
}
DIV {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: #000000; FONT-SIZE: 12px; PADDING-TOP: 0px
}
A {
PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: #666; FONT-SIZE: 12px; PADDING-TOP: 0px
}
UL {
PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; LIST-STYLE-IMAGE: none; PADDING-TOP: 0px
}
LI {
PADDING-BOTTOM: 0px; LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; LIST-STYLE-IMAGE: none; PADDING-TOP: 0px
}
A:link {
COLOR: #666; TEXT-DECORATION: none
}
A:visited {
COLOR: #666; TEXT-DECORATION: none
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
IMG {
BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px
}
.top {
MARGIN: 0px auto; WIDTH: 980px; HEIGHT: 110px
}
.logo {
FLOAT: left
}
.tel {
FLOAT: left
}
.nav {
MARGIN-TOP: 10px; WIDTH: 100%; BACKGROUND: url(../images/nav_bg.jpg) repeat-x; HEIGHT: 35px
}
.nav UL {
MARGIN: 0px auto; PADDING-LEFT: 15px; WIDTH: 965px; HEIGHT: 35px
}
.nav1 {
TEXT-ALIGN: center; LINE-HEIGHT: 34px; WIDTH: 130px; BACKGROUND: url(../images/nav_line.jpg) no-repeat right center; FLOAT: left
}
.nav2 {
TEXT-ALIGN: center; LINE-HEIGHT: 34px; WIDTH: 130px; FLOAT: left
}
.nav1 A {
COLOR: #fff; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.nav1 A:hover {
COLOR: #ff0000
}
.nav2 A {
COLOR: #fff; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.nav2 A:hover {
COLOR: #ff0000
}
.flash {
MARGIN: 0px auto; WIDTH: 980px; HEIGHT: 272px
}
.center1 {
MARGIN: 15px auto 0px; WIDTH: 980px; BACKGROUND: url(../images/center_bg.jpg) no-repeat; HEIGHT: 488px; PADDING-TOP: 20px
}
.center1_1 {
WIDTH: 209px; FLOAT: left
}
.center1_1_title {
PADDING-LEFT: 25px; BACKGROUND: url(../images/line1.jpg) no-repeat center bottom; HEIGHT: 25px; COLOR: #333; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.center1_1_title SPAN {
COLOR: #ff0000; FONT-WEIGHT: normal
}
.center1_2 {
WIDTH: 560px; FLOAT: left
}
.center1_3 {
WIDTH: 211px; FLOAT: left
}
.ul1 {
PADDING-LEFT: 40px; FLOAT: left
}
.ul1_li {
LINE-HEIGHT: 27px; PADDING-LEFT: 10px; BACKGROUND: url(../images/ic1.jpg) no-repeat left center
}
.ul2 {
PADDING-LEFT: 16px; FLOAT: left
}
.center1_2_about_title {
PADDING-LEFT: 25px; BACKGROUND: url(../images/line2.jpg) no-repeat center bottom; HEIGHT: 25px; COLOR: #333; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.center1_2_about_title SPAN {
COLOR: #ff0000; FONT-WEIGHT: normal
}
.center1_2_about_text {
LINE-HEIGHT: 28px; TEXT-INDENT: 2em; PADDING-LEFT: 15px; WIDTH: 530px; PADDING-TOP: 10px
}
.center1_2_knowledge {
POSITION: relative; MARGIN-TOP: 20px
}
.center1_2_knowledge1 {
PADDING-LEFT: 25px; PADDING-TOP: 10px
}
.knowldge_li {
POSITION: relative; LINE-HEIGHT: 32px; WIDTH: 494px; BACKGROUND: url(../images/dot.jpg) repeat-x center bottom
}
.knowldge_li A {
PADDING-LEFT: 10px; BACKGROUND: url(../images/ic2.jpg) no-repeat left center
}
.knowldge_li SPAN {
POSITION: absolute; TOP: 5px; RIGHT: 20px
}
.more {
POSITION: absolute; TOP: 0px; RIGHT: 40px
}
.xwdt_text {
PADDING-LEFT: 20px; PADDING-TOP: 10px
}
.xwdt_text_li {
LINE-HEIGHT: 30px; WIDTH: 171px; BACKGROUND: url(../images/dot.jpg) repeat-x center bottom
}
.xwdt_text_li A {
PADDING-LEFT: 15px; BACKGROUND: url(../images/ic2.jpg) no-repeat left center
}
.center1_3_sfbz {
POSITION: relative; PADDING-TOP: 35px
}
.center1_3_xwdt {
POSITION: relative
}
.hzdw {
POSITION: relative; PADDING-BOTTOM: 20px; MARGIN: 0px auto; PADDING-LEFT: 0px; WIDTH: 980px; PADDING-RIGHT: 0px; OVERFLOW: hidden; PADDING-TOP: 20px
}
.more2 {
POSITION: absolute; TOP: 32px; RIGHT: 10px
}
.more1 {
POSITION: absolute; TOP: 35px; RIGHT: 10px
}
.hzdw_title {
COLOR: #333; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.hzdw_title SPAN {
COLOR: #ff0000; FONT-WEIGHT: normal
}
.hzdw_pic {
WIDTH: 980px; HEIGHT: 80px; PADDING-TOP: 20px
}
.left {
PADDING-LEFT: 8px; FLOAT: left; PADDING-TOP: 18px
}
.pic_list {
WIDTH: 910px; FLOAT: left
}
.right {
FLOAT: left; PADDING-TOP: 18px
}
.pic_list1 {
TEXT-ALIGN: center; WIDTH: 130px; FLOAT: left
}
.p1 {
PADDING-TOP: 8px
}
.foot {
WIDTH: 100%; BACKGROUND: url(../images/foot_bg.jpg) repeat-x; HEIGHT: 11px; PADDING-TOP: 15px
}
.foot_text {
MARGIN: 0px auto; WIDTH: 980px; HEIGHT: 113px
}
.foot_text_left {
WIDTH: 245px; FLOAT: left; HEIGHT: 113px
}
.foot_text_right {
WIDTH: 980px; FLOAT: left
}
.p2 {
PADDING-LEFT: 0px; PADDING-TOP: 5px
}
.p2 A {
MARGIN-LEFT: 15px; FONT-SIZE: 14px; MARGIN-RIGHT: 15px
}
.p3 {
TEXT-ALIGN: center; LINE-HEIGHT: 22px; PADDING-TOP: 10px
}
.list {
PADDING-BOTTOM: 25px; MARGIN: 0px auto; WIDTH: 980px; OVERFLOW: hidden
}
.list1 {
MARGIN-TOP: 15px; WIDTH: 980px; BACKGROUND: url(../images/list_bg.jpg) no-repeat; HEIGHT: 455px
}
.list1_left {
WIDTH: 215px; FLOAT: left; PADDING-TOP: 20px
}
.list1_right {
PADDING-LEFT: 20px; WIDTH: 719px; FLOAT: left; PADDING-TOP: 20px
}
.list1_right_title {
PADDING-LEFT: 20px; WIDTH: 719px; BACKGROUND: url(../images/ic3.jpg) no-repeat left center; HEIGHT: 16px; FONT-SIZE: 14px
}
.list1_right_title a {
FONT-SIZE: 14px; color:#000000
}
.right_text {
LINE-HEIGHT: 27px; PADDING-LEFT: 15px; WIDTH: 706px
}
.list1_li {
PADDING-LEFT: 10px
}
.list1_li_text {
POSITION: relative; LINE-HEIGHT: 35px; WIDTH: 684px; BACKGROUND: url(../images/dot.jpg) repeat-x center bottom
}
.list1_li_text A {
PADDING-LEFT: 15px; BACKGROUND: url(../images/dot1.jpg) no-repeat left center
}
.list1_li SPAN {
POSITION: absolute; TOP: 0px; RIGHT: 15px
}
.newstitle {
BORDER-BOTTOM: #cccccc 1px dashed; TEXT-ALIGN: center; LINE-HEIGHT: 40px; MARGIN-TOP: 20px; FONT-SIZE: 16px; VERTICAL-ALIGN: middle; FONT-WEIGHT: bold
}
/公司荣誉 样式/
.ry_nr ul{ margin:0; padding:0; }
.ry_nr li{width:216px; height:195px;float:left; padding:5px 10px; text-align:center; }
.ry_nr li img{ width:210px; height:163px;float:left; padding:2px; border:1px solid #ccc;}
.ry_nr li p{width:216px; color:#343333; float:left; line-height:28px; padding-top:5px;text-align:center;}
.ry_nr li p a{color:#1c1c1c;text-decoration:none;}
.ry_nr li p a:hover{color:#004ba7;text-decoration: underline;}
.pagefy{text-align:center;padding:15px 0px ;float:left;width:712px; margin-top:15px;border-top:2px solid #ccc; }
.pagefy a{color:#343333;text-decoration:none;padding:0px 6px; }
.pagefy a:hover{color:#004ba7;text-decoration:underline;font-weight: bold;}
.en_ziti{font-family:Arial, Helvetica, sans-serif}
网友评论