PDA

View Full Version : سوال: مشکل بزرگ نشدن div



DR.HTML
شنبه 19 آذر 1390, 12:02 عصر
ُلام دوستان من یه قالب رای وردس دارم میسازم اما یه مشکل برخوردم اونم اینه که div که توش div های پست هست اصلا بزرگ نمیشه یعنی وقتی پست اضافه میشه div پست از div اصلیش میگزره اما وقتی به این Div اصلی flaot میدم درست میشه اما من میخوام وسط چین باشه
میشه بگین مشکل ازکجاست اینم کد هام
این css
/* /

*/
@font-face {
font-family: "arian";
src: url("font/BKoodakBold.eot?#") format("eot"), url("font/BKoodakBold.woff") format("woff"), url("font/BKoodakBold.ttf") format("truetype");
}

#right{width:100%;
float:right;
height:100px;
margin:0px auto;
}
body{margin:0px auto;
background:url(images/bg.jpg);
text-align:right;
font-family:Tahoma, Geneva, sans-serif;
text-decoration:none;
}
a{text-decoration:none;
}
#header{width:1000px;
margin:0px auto;
height:179px;
background:url(images/top.jpg);
}
#content{width:969px;
margin:0px auto;
background:#fff;
border-radius:8px 8px 8px 8px;
min-height:100px;
}
#footer{width:100%;
height:200px;
background:#454545;
margin-bottom:0px;
margin-top:30px;
float:right;
}
.post{width:649px;
float:left;
background:#EDF0E3;
margin-top:10px;
margin-bottom:20px;
}
#sidebar{float:right;
width:305px;
min-height:40px;
margin-top:14px;

}
.tit{width:647px;
height:49px;
background:url(images/p1.gif) top right no-repeat;
}
.tit a{color:#464646;
}
.tits{padding: 18px 55px 0 0;
font-size:11pt;
color:#464646;
height:30px;
font-family:arian;
}
.matn{
line-height: 150%;
padding: 2px 20px 3px 18px;
color: #333333;
float: right;
font-size: 9pt;
margin-top:10px;
width:613px;
}
#pic{height:270px;
}

#cat{background:url(images/mozu.jpg) top center no-repeat;
direction:rtl;
text-align:right;

}

ul{list-style:none;
text-decoration:none;
}
.menov{padding:30px 0px 0px 0px;
}

.menov li a {
height: 32px;
voice-family: "\"}\"";
voice-family: inherit;
font-family:arian;
height: 24px;
text-decoration: none;
text-shadow:1px 1px 0px #A1A1A1;
font-size:13px;
border-radius:8px 8px 8px 8px;
padding: 0px 5px 0 20px;
transition: 1s;
-moz-transition: 1s; /* Firefox 4 */
-webkit-transition: 1s; /* Safari and Chrome */
-o-transition: 1s; /* Opera */

}
.menov li a:link, #menu2 li a:visited {
color: #3688BA;
display: block;
background: url(images/menu8.gif) top right;

}
.menov li a:hover {
color: #3688BA;
background: url(images/menu9.gif) top right no-repeat ;
padding: 0px 15px 0 0px;
text-shadow:1px 1px 0px #BABABA;
font-weight:bold;
transform: rotate(-1deg);
-ms-transform: rotate(-1deg); /* IE 9 */
-webkit-transform: rotate(-1deg); /* Safari and Chrome */
-o-transform: rotate(-1deg); /* Opera */
-moz-transform: rotate(-1deg); /* Firefox */
}



اینم اچ تی ام الش

<!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><?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
</head>

<body>
<div id="header"></div>
<div>
<div id="content">
<div id="sidebar">
<div id="pic"></div>
<div class="menov" id="cat"><ul><li><?php wp_list_cats('sort_column=name'); ?></li></ul>
</div>
<div class="menov"><div class="menu"><ul><li></li></ul></div></div>
<div class="menov"><div class="menu"><ul><li></li></ul></div></div>
<div class="menov"><div class="menu"><ul><li></li></ul></div></div>
<div class="menov"><div class="menu"><ul><li></li></ul></div></div>

</div>
<?php if(have_posts()): ?><?php while(have_posts()): the_post();?>
<div class="post">
<div class="tit"><h2 class="tits"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div>

<div class="matn"><?php the_content(); ?></div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div id="right"></div>
</div>
<div id="footer"></div>

</body>
</html>


div اصلی که میگم content هستش که وقتی height بهش نمیدی اصلا نیستش وقتی min-height میدی اصلا بزرگ نمیشه(با دادن پست جدید بزرگ نمیشه)

Saber Mogaddas
شنبه 19 آذر 1390, 14:03 عصر
سلام
به دیو اصلی min-height بده و overflow رو hidden قرار بده ..

maryamm_20
شنبه 19 آذر 1390, 15:28 عصر
سلام
سورس css خیلی مرتب نبود
height های DIV ها به نظرم تنظیم نبودن و overflow div#right o hidden کنی بهتره :لبخندساده:

DR.HTML
شنبه 19 آذر 1390, 19:23 عصر
با تشکر درست شد