出于某种原因,我的css居中代码正在搞乱小部件。小部件正在列下方下推。此外,导航栏小部件位于论坛的所有页面上。
我真的非常感谢任何帮助。感谢。
问题图片:http://i1335.photobucket.com/albums/w662/dnpranks/Untitled15_zps89a1c5e9.png
~Widget假设更多,就在列旁边。
以下是导致问题的列的代码:
HTML:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pricies Table</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700' rel='stylesheet' type='text/css' />
<link rel="stylesheet" type="text/css" href="css/style_price_table_dark.css" />
</head>
<body>
<div class="left">
<div class="pricing_table_row">
<div class="first_child">
<div class="title_first_colum"><center><img src="http://i1335.photobucket.com/albums/w662/dnpranks/_slotbutton__zpsb8778ee4.png"></center></div>
</div>
<ul>
<li class="first_colum"><img src="http://i.imgur.com/4IOlEBU.png"></li>
<li class="first_colum black"><img src="http://i.imgur.com/FrohEbX.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/GnnOkkw.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/pvJPDni.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/xux1rsZ.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/Krg86nA.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/6yBmM4e.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/4D1nzMY.png"></li>
<li class="first_colum"><img src="http://i.imgur.com/ZFtOSeS.png"></li>
</ul>
</div>
<div class="ptable">
<div class="pricing_table_row">
<div class="first_child">
<div class="title">Bet</div>
<div class="price">100<br /><span class="small">DP</span></div>
</div>
<ul>
<li><center><div class="colorletter"><strong><br>600</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>400</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>300</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>200</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>200</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>100</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>-50</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>-100</br></strong></center></li>
<li><center><div class="colorletter"><strong><br>-200</br></strong></center></li>
</ul>
</div>
<div class="pricing_table_row">
<div class="first_child">
<div class="title">Bet</div>
<div class="pricet">75<br /><span class="small">DP</span></div>
</div>
<ul>
<li><div class="colorlettert"><center><strong><br>400</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>300</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>200</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>150</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>150</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>75</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>-50</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>-75</br></strong></center></li>
<li><div class="colorlettert"><center><strong><br>-150</br></strong></center></li>
</ul>
</div>
<div class="pricing_table_row">
<div class="first_child">
<div class="title">Bet</div>
<div class="pricew">50<br /><span class="small">DP</span></div>
</div>
<ul>
<li><center><div class="colorletterw"><strong><br>300</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>200</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>150</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>100</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>100</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>50</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>-25</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>-50</br></strong></center></li>
<li><center><div class="colorletterw"><strong><br>-75</br></strong></center></li>
</ul>
</div>
<div class="left">
<form method="post" action="/posting.forum" onsubmit="return vB_Editor['text_editor'].prepare_submit(0, 0)" name="post" id="quick_reply">
<div style="clear: both; margin-left: auto; width: 150px; margin-right: auto; height: 169px;" id="textarea_content">
<textarea editorid="text_editor" cols="50" rows="10" name="message" style="font-size: 1.0m;" id="text_editor_textarea" class="inputbox">Bet Amount: </textarea>
</div>
<center>
<input type="hidden" name="mode" value="reply" /><input type="hidden" name="sid" value="26766" /><input type="hidden" name="t" value="3671" /><br /><input onclick="confirm('Make sure that the requested item(s) is(are) in the Supreme Market list and that you have sufficient amount Duel Points for it.');" type="submit" class="button1" value="Send" name="post" />
</center>
</form>
</body>
</html>
的CSS:
/*
DICE GAME TABLE
*/
/* Elements styles */
.pricing_table_row {
list-style:none;
float:left;
width:245px;
margin:0px;
padding:3px;
text-align:center;
background-color:#444444;
font-family: 'Open Sans Condensed', sans-serif;
}
.left {
margin: 0 auto;
text-align:center;
width:1024px;
min-width:auto;
overflow: hidden;
}
.right {
margin-left: -28%;
}
.pricing_table_row ul {
list-style:none
width:232px;
margin:3;
padding:3px;
text-align:center;
background-color:#444444;
font-family: 'Open Sans Condensed', sans-serif;
}
.pricing_table_row ul {
list-style:none;
float:left;
width:232px;
margin:0;
padding:3px;
text-align:center;
background-color:#444444;
font-family: 'Open Sans Condensed', sans-serif;
}
.pricing_table_row ul li {
border:1px solid #5b5b5b;
background-color: #2c2c2c;
margin-top:6px;
width: 232px;
height: 101px;
display: block;
line-height: 30px;
color: #FFFFFF;
}
.pricing_table_row ul li {
font-size:50px;
height: 101px;
}
.first_child{
margin-top:6px;
border: 2px solid #5b5b5b;
font-size:50px;
font-weight:bold;
height: 159px;
background-color: #2c2c2c;
text-align:center;
width: 230px;
margin: 4px;
}
.last_child{
float:left;
margin-top: 6px;
margin-left: 3px;
border: 1px solid #5b5b5b;
font-size:18px;
font-weight:bold;
height: 120px;
width: 232px;
background-color: #2c2c2c;
text-align:center;
}
.title{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
height: 41px;
width: 212px;
margin: 10px 9px 9px 9px;
padding-top: 0px;
font-size: 28px;
color: #ffffff;
background-color: #91040b;
}
.title_first_colum{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
color: #01b8e2;
height: 159px;
width: 232px;
margin:0;
padding-top: 15px;
font-size: 28px;
}
.price{
padding-top: 13px;
color: #6e8c92;
background-color: #000000;
font-weight: 700;
height: 75px;
width: 212px;
margin: 9px;
font-size: 50px;
line-height: 34px;
}
.pricet{
padding-top: 13px;
color: #ff0000;
background-color: #000000;
font-weight: 700;
height: 75px;
width: 212px;
margin: 9px;
font-size: 50px;
line-height: 34px;
}
.pricew{
padding-top: 13px;
color: #ff6600;
background-color: #000000;
font-weight: 700;
height: 75px;
width: 212px;
margin: 9px;
font-size: 50px;
line-height: 34px;
}
.colorletter{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
font-size: 50px;
color: #6e8c92;
}
.colorlettert{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
font-size: 50px;
color: #ff0000;
}
.colorletterw{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
font-size: 50px;
color: #ff6600;
}
.price_small{
color: #01b8e2;
padding-top: 13px;
font-weight: 700;
height: 67px;
width: 232px;
margin: 10px;
font-size: 25px;
line-height: 18px;
}
.subprice{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
font-size: 50px;
color: #FFFFFF;
}
.subprice_small{
font-family: 'Open Sans Condensed', serif;
font-weight: 700;
font-size: 25px;
color: #FFFFFF;
}
.small{
font-family: 'Open Sans Condensed', serif;
font-weight: 300;
font-size: 15px;
color: #FFFFFF;
}
.list_check {
background:url(../images/icon_check_dark.png) 0 0 no-repeat;
background-position: center;
}
.list_x {
background:url(../images/icon_x_dark.png) 0 0 no-repeat;
background-position: center;
}
.button{
font-family: 'Open Sans Condensed', serif;
font-weight: 700;
font-size: 17px;
margin-top: 10px;
border: none;
height: 30px;
width: 232px;
color: #FFFFFF;
background-color: #01b8e2;
}
.button:hover{
font-family: 'Open Sans Condensed', serif;
font-weight: 700;
font-size: 17px;
margin-top: 10px;
border: none;
background-color: #000000;
height: 30px;
width: 232px;
color: #FFFFFF;
}
.first_colum{
text-align: left;
padding-left: 0px;
}
.black{
background-color: #000000;
}
答案 0 :(得分:0)
尝试删除HTML代码末尾附近的clear:both
,看看是否能解决问题。如果没有看到代码,我无法确定它是否会解决它,但我自己也遇到了非常类似的问题clear
推送了其他内容。
变化:
<div style="clear: both; margin-left: auto; width: 150px; margin-right: auto; height: 169px;" id="textarea_content">
<textarea editorid="text_editor" cols="50" rows="10" name="message" style="font-size: 1.0m;" id="text_editor_textarea" class="inputbox">Bet Amount: </textarea>
</div>
要:
<div style="margin-left: auto; width: 150px; margin-right: auto; height: 169px;" id="textarea_content">
<textarea editorid="text_editor" cols="50" rows="10" name="message" style="font-size: 1.0m;" id="text_editor_textarea" class="inputbox">Bet Amount: </textarea>
</div>