نوشته شده توسط
yasercomeng
چون متنی که قراره تو اون دو تا جعبه ی بالایی قرار بگیره از پایگاه داده دریافت می شه و با این وجود ممکنه کاملا اندازه ها متفاوت باشه.بنابراین من ساختاری رو می خوام که بتونه جعبه ی سوم رو زیر جعبه ای قرار بده که بیشترین طول متن یا همون ارتفاع تو صفحه رو داشته باشه؟
برای این پویایی چه کاری باید انجام بدم؟
دوست من،من اگر جای شما بودم از scroll استفاده میکردم.چون جدول هم دردسر های مخصوص خودش را داره و در نمایش کل صفحه ات شما را دچار مشکل میکند:
<html>
<head>
<title>barname nevise.org</title>
<style type="text/css">
.left
{
background-color:blue;
width:45%;
height:4em;
overflow: scroll;
float:left;
}
.bottom
{
background-color:orange;
width:100%;
height:4em;
overflow: scroll;
float:right;
}
.right
{
background-color:red;
width:50%;
height:4em;
overflow: scroll;
float:right;
}
</style>
</head>
<body>
<p>The overflow property decides what to do if the content inside an element exceeds the given width and height properties.</p>
<div class="left">
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
</div>
<div class="right">
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
</div>
<div class="bottom">
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
</div>
</body>
</html>
قسمتی از این کد از w3school اقتباس شده است
توی ff3 و IE8 beta آزمایش شد مشکلی نداشت.
آقا عماد این کار مشکلی ندارد؟