css - 分隔表中的 <th> 个元素

标签 css html

我正在尝试列出手机网站,这是实际问题,请看这里的屏幕截图,代码也是 thml 和 css 文件 <th> s 必须用边框分隔这是图片:http://i.stack.imgur.com/b3A7S.png

代码:

<html>
    <head>
        <title>Mobile phones</title>
        <link rel="stylesheet" href="styles.css">
    </head>
    <h1>eMobile</h1>

    <div id="wid">
        <input type="text" name="manuf" value="დასახელება"></br>
        <select>
            <option value="none">მწარმოებელი</option>
            <option value="nokia">Nokia</option>
            <option value="mercedes">Samsung</option>
            <option value="sony">Sony</option>
        </select> </br>
     ფილტრაცია ფასით</br>
    დან:<input type="number" name="from" value="0"> მდე:<input type="number" name="to_the" value="99999">
        <input type="submit" value="Submit">
    </div>
    <table>
        <tr>
            <th><img src="2058.jpg"> </br>  <h5>Lumia 1520 Black</h5></th>
            <th><img src="2058.jpg"> </br>  <h5>Lumia 1520 Black</h5></th>
        </tr>
    </table>        
</html>

CSS

body {
    background-color: #66CCFF
}
h1 {
    color: black;
    border-bottom:solid #2A1959;
    position:relative;
    top:30px;
}
select {
    width:173px;
}
tr,td {
    height=300px;
    width=200px;
    border:2px solid black;
    position: absolute;
    top: 20px;
    left: 30px;
    colspan="0"
}      
table {
    height:500px;
    width:800px;
    border:3px solid black;
    position: absolute;
    top: 130px;
    left: 330px;
    z-index: -1;
}      
#wid {
    width: 200px;
    height: 600px;
    border-right:solid #2A1959;
    position: relative;
    top: 50px;
    left: 50px;
}
#wid div {
    position: relative;
    top: 500px;
    left: 100px;
}

最佳答案

使用border分隔th

th {
font-weight: bold;
border: 2px solid #000;
}

Demo

关于css - 分隔表中的 <th> 个元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25945716/

相关文章:

css - 如何居中 JQM 网格?

javascript - 页面加载后如何启动webkit动画?

jquery - 显示文本而不是值的 html 范围 slider

c# - Bootstrap css 覆盖自定义 css 样式

javascript - 如何在 react 中将组件引用传递给路由组件

html - IE11 : very poor perfomance in rendering tables - any solutions?

html - 将一个 div 定位到另一个 div 的右侧

html - 当 &lt;input&gt; 标签上的 "-webkit-appearance: none"和值 =""时,Chrome 中的高度不正确

html - DIV 未调整为文本高度。为什么?

javascript - iPad Canvas 旋转