Archive for category DIV+CSS

CSS input 针对text,image等type显示不同样式

<style type=”text/css”>
<!–
INPUT{
 border: 1px solid #D4D0C8;
 width: 200px;
}
input[type=text]
{
 background-color: #FFCC33;
}
input[type=checkbox],input[type=radio]
{
 width: 20px;border: 0px;
}
–>
</style>
</head>
<body>
<form id=”form1″ name=”form1″ method=”post” action=”">
  <input type=”text” name=”textfield” />
  <input name=”radiobutton” type=”radio” value=”radiobutton” />
  <input type=”checkbox” name=”checkbox” value=”checkbox” />
</form>

IE8和火狐均支持

  • Share/Bookmark

Tags: , ,

CSS之TR标签无法加border的解决办法

类似如下代码:

.thickBorder {
border-style : solid;
border-width:2 px;
border-color : black;
}

<table border=0 width=100% align=center cellpadding=’0′ cellspacing=’0′ class=’propList’>
<tr class=’thickBorder’>
<td>

</td>
<td>

</td>
</tr>
</table>

在tr的class里定义的border会无效,只能定义backgrount等属性

解决方法是,将CSS样式定义在td标签里,如下:

.thickBorder td {
border-style : solid;
border-width:2 px;
border-color : black;
}

即OK

  • Share/Bookmark

Tags: , , , ,