1.关于链接样式的设置问题!
大家经常使用如下的方式设置链接的css样式:
a:link {
color: #2D8002;
text-decoration: underline;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
a:visited {
color: #003300;
text-decoration: underline;
}
可有的时候命名设置好了hover样式,对于已经访问过的链接,当鼠标移到链接上时,结果却仍然显示的是visited的样式,怎么改怎么都这样,一次偶然的机会让我发现了问题的关键所在。。。(真啰嗦!!!)
原来css样式的各个设置也是有顺序的,上边的例子就可以正常看到访问过的链接效果,而下边的例子就不可以,这样大家就明白了吧:
a:link {
color: #2D8002;
text-decoration: underline;
}
a:visited {
color: #003300;
text-decoration: underline;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
2.关于表格中输入的英文字母过长就会使表格变形的纠正措施
只需在表格中加入 style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word;"就可以了
意思就是把宽度固定,自动换行。
3.如果将处于同一td内的图片和文本垂直对齐
给图片的属性加入 align="absmiddle",td的垂直设置成居中对齐就ok了。
4.让DIV标签在页面内居中
看过很多的网页用div控制起来很方便,比如donews、博客、土豆、163信箱。。。
不过一直使我困惑的是怎么让div标签居中显示,今天终于发现了,竟然是设置margin=auto,当然前提是加了<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
posted on 2006-06-17 10:22
迷途小猪儿 阅读(721)
评论(2) 编辑 收藏