问题描述:

Button should be on top in center and table next to the button means down in center. I have done button but problem is in table.................. ![enter image description here][1]

[1]: http://i.stack.imgur.com/3bxei.jpg

 <html>

<body>

<head>

<style>

#buttons{

float:right;

position:relative;

left:-50%;

text-align:left;

}

#buttons ul{

list-style:none;

position:relative;

left:50%;

width: 100%;

}

#buttons li{float:left;position:relative; font-size: 23px;}/* ie needs position:relative here*/

#buttons a{

text-decoration:none;

margin:10px;

background:red;

float:left;

border:2px outset Red;

color:#fff;

padding:2px 5px;

text-align:center;

white-space:nowrap;

}

#buttons a:hover{ border:2px inset blue;color:red;background:#f2f2f2;}

</style>

</head>

<body>

<div id="buttons">

<ul>

<li><a href="#"> Home</a></li>

<li><a href="#">Add Product </a></li>

<li><a href="#">Add Product Image</a></li>

</ul>

</div>

<form>

<table>

<tr>

<td>Jill</td>

<td>Smith</td>

<td>50</td>

</tr>

<tr>

<td>Eve</td>

<td>Jackson</td>

<td>94</td>

</tr>

<tr>

<td>John</td>

<td>Doe</td>

<td>80</td>

</tr>

</table>

</form>

</body>

</html>

网友答案:

you can use like this check here Js fiddle add a div outside table and

.table-con {
  margin: 0 auto;
  clear: both;
  width: 23%;
}
相关阅读:
Top