ITeye博客

css

共 6 篇文章

(转)TABLE固定宽度输出文本自动换行

转 http://hi.baidu.com/eeeeeeee/blog/item/5a90b59981c4730f6f068ce5.html 相信很多朋友在开发时都遇到输出<TABLE><TR><TD>中的内容时,TD的宽度会随着内容的长度增加而变化的问题,在加入<DIV style="width:20px">限制时也不能解决.这里和大家分享下HTML之限制文本输出宽度. 如1:限制的80PX并没有起作用 解决方法之1: style中有table-layout属性设置为fixed为固定表格输出时的宽度.代码及效果如2. 解决方法之2: 如果需要宽度不变又不换行还要显示文本没有全部显示可以将T…

2011-06-01 13:55 · css · HTML · CSS · Blog

Css.Mastery.Advanced.Web.Standards.Solutions.2nd.Edition 笔记

#intro {font-weight: bold;} id 选择器 .date-posted {color: #ccc;} class 选择器 #main-content h2 {font-size: 1.8em;} main-content 和 h2之间可以不是直接的父子关系 a:link {color:blue;} a:visited {color:green;} a:hover, a:focus, a:active {color:red;} tr:hover {background-color: red;} input:focus {background-color:yellow;}…

2011-04-14 16:01 · css · 浏览器 · CSS · Windows · Web · IE

(转)div设置滚动条和滚动条属性

当div所定义的区域的内容达到一定程度时,在div标签里面嵌入css样式表,定义overflow的属性值,设置滚动条相关的属性。 <style tyle="text/css"> .testDiv{ border-style: solid ; border-width: 50px ; border-color: pink ; position: absolute ; /* 位置 绝对或者相对于最近的一个元素 relative absolute */ top:200px ; left:300px ; height:200px ; /* 定义区域的高*/ width:300px ; /* 滚动条 …

2010-04-02 04:23 · css · CSS

html 页面居中 IE Firefox

#everything { width: 800px; margin: 0 auto; padding: 20px 10px; } 这个是可以让页面居中的 但开始的时候只有firefox居中了 IE6 8都没有居中 后来发现问题出在 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 换成下面的IE就可以居中了 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-t…

2010-04-02 03:37 · css · HTML · Firefox · XHTML · IE

css 学习

display:block (div) inline(span) none(hide) 标准流 浮动流 float:left right clear:left right position:static relative absolute fixed (top botton right left) .Absolute-Center { margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; } style="cursor: pointer;" 悬停时鼠标的样子

2009-09-15 09:13 · css · CSS

css 关于float: right使用及靠右换行的解决办法

1、float: right的简单用法:使用代码<span style="float: right"> ****** </SPAN>,其中******就是你调用的元素,比如发布日期:{dateline},如果想让此元素靠右,则相应为:<span style="float: right">{dateline} </SPAN>; 2、当使用span时,很多站长反映:靠右的元素和前面的元素被自动换行了,即不再在同一行内,原因是:当非float的元素和float的元素在一起的时候,如果非float元素在先,那么float的元素将被排斥。 也就是说:如果你在设置span是float:right时,把他…

2009-05-15 15:00 · css · CSS