div block centered display_html/css_WEB-ITnose
Jun 24, 2016 am 11:59 AM <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
#divbg
{
width: 98%;
margin-left: auto;
margin-right: auto;
}
#divbg li
{
float: left;
background: rgb(231,231,231);
width: 180px;
height: 180px;
font-size: 20px;
list-style-type: none;
cursor: hand;
line-height: 40px;
text-align: center;
cursor: pointer;
margin-bottom: 2%;
margin-top: 4%;
margin-left: 5.5%;
margin-right: 5.5%;
}
#box
{
margin:0 0 0 0;
position: absolute;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<script src="libraryjs/mainnews.js" type="text/javascript"></script>
<div id="box">
<div id="P_1" style="overflow: hidden;">
<ul id="divbg">
<li>
<div>
<a class="a">旅游</a><br />
<a href="OrderZX.aspx">待审订单(<font color="red"><%= lvyou%></font>个)</a><br />
<a href="TeamList.aspx">待审团队(<font color="red"><%= tuandui%></font>个)</a><br />
<a href="LineSearch.aspx">产品预订</a></div>
</li>
<li>
<div>
<a>签证</a><br />
<a href="QianZhenOrder.aspx?TY=sd">待审订单(<font color="red"><%= qianzheng%></font>个)</a><br />
<a href="QZOrderList.aspx">产品预订</a></div>
</li>
<li>
<div>
<a>订房</a><br />
<a href="#">待审订单(<font color="red"><%= dingfan%></font>个)</a><br />
<a href="#">产品预订</a></div>
</li>
<li>
<div>
<a>门票</a><br />
<a href="SpotOrder.aspx?TY=sd">待审订单(<font color="red"><%= menpiao%></font>个)</a><br />
<a href="SpotCPList.aspx">产品预订</a></div>
</li>
<li>
<div>
<a>租车</a><br />
<a href="CarOrder.aspx?TY=sd">待审订单(<font color="red"><%= zuche%></font>个)</a><br />
<a href="CarSearch.aspx">产品预订</a></div>
</li>
<li>
<div>
<a>公文</a><br />
<a href="GongWenManger.aspx?TY=gg&tabs=sysb">待阅公文(<font color="red"><%= gongwen%></font>个)</a><br />
<span id="spanadd" style="display: none"><a href="javascript:void(0)"
target="_self">发布公文</a></span>
</div>
</li>
<li>
<div>
<a>留言</a><br />
<a href="GongWenManger.aspx?TY=gg&tabs=sdly">待复留言(<font color="red"><%= liuyan%></font>个)</a><br />
<a href="javascript:void(0)" target="_self">发布留言</a></div> </li>
<li>
" "CWCDayList.aspx">Pending financial affairs (<font color="red"><%= caiwu%></font>)</a><br />
<span id="sw" style="display: none"><a href="javascript:void(0)"
because /span></div>
🎜> </form>
</body>
</html>
The code is as above. The function I want is to display eight small blocks in the center. Initially, there are 4 in each row. The window shrinks and becomes larger. The small blocks among them also need to be centered. Small The block size is fixed at 180*180. I have been debugging the css for a long time, but I still can’t adjust it. . . .
Reply to the discussion (solution)
Is there anyone here? ? ? ? ?
Don’t you think it looks better this way?
Like the moderator. Correct answer upstairs.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to remove news and trending content from Windows 11 Search

iOS 17's standby mode turns a charging iPhone into a home hub

Windows 11 User Guide: How to disable ad pop-ups

Reasons and solutions for desktop layout being locked

How to make a remote desktop connection display the other party's taskbar

How to display the wifi password QR code? It is recommended to scan the wifi password on WeChat in 3 seconds.

Samsung will provide displays for Microsoft's MR headsets, and the devices are expected to be lighter and have clearer displays
