Merhabalar,
div içine 2 div koyuyorum sol tarafda resim sağ tarafda ortalanmış şekilde yazı olacak. Haberleri listeletiyorum.
ilk div 600px
resim div 100px, metin dive 500px veriyorum fakat yazı resimin altından başlıyor. Yardımcı olabilir misiniz?
.index_orta_sol
{
width:610px;
height:auto;
float:left;
text-align:center;
}
.index_orta_sol_haber
{
width:610px;
height:auto;
float:left;
}
.index_orta_sol_haber_resim
{
width:100px;
height:100px;
float:left;
}
.index_orta_sol_haber_metin
{
width:400px;
height:50px;
margin-left:10px;
font-size:25px;
font-family:Tahoma, Geneva, sans-serif;
float:left;
}
div class="index_orta_sol_haber">
<?php
$duyuru_cek=mysql_query("select * from duyurular where durum='1' order by sira desc limit 4");
while($duyuru_dizi=mysql_fetch_array($duyuru_cek))
{
?>
<div class="index_orta_sol_haber_resim">
<img src="lib/images/duyurular/<?=$duyuru_dizi['resim']?>" width="100" height="100">
</div>
<div class="index_orta_sol_haber_metin">
<?php echo substr($duyuru_dizi['aciklama'],0,400); ?><a href="duyuru_detay.php?id=<?=$duyuru_dizi['id']?>"> devamı...</a></li>
</div>
<?php
}
?>
</div>
Yazı aşağıya kaçıyor anlamadım
2
●444
- 14-03-2014, 18:43:10Senin kodları direkt online test ettim kayma problemi yok. Bunları kapsayan divde problem olabilir
http://cssdesk.com/hh2fR - 15-03-2014, 21:03:40Ben bu işin içinden çokamadım. Dreamweaver design da sorun yok fakat çalıştırınca düzgün gelmiyor. yardımcı olurmusunuz kapsayan divlerle kod şu şekilde
.anakutu
{
width:932px;
height:auto;
margin:auto;
}
.slider
{
width:932px;
height:415px;
float:left;
margin-top:20px;
}
.index_orta
{
width:912px;
height:auto;
min-height:255px;
float:left;
background:#f6f5f2;
padding:10px;
}
.index_orta_sol
{
width:610px;
height:auto;
float:left;
text-align:center;
}
.index_orta_sol_haber
{
width:610px;
height:auto;
float:left;
background:#F00;
}
.index_orta_sol_haber_resim
{
width:100px;
height:100px;
float:left;
}
.index_orta_sol_haber_metin
{
width:500px;
height:100px;
margin-left:10px;
font-size:20px;
font-family:Tahoma, Geneva, sans-serif;
float:left;
}
<div class="anakutu">
<div class="index_orta">
<div class="index_orta_sol">
<div class="index_orta_sol_haber">
<?php
$duyuru_cek=mysql_query("select * from duyurular where durum='1' order by sira desc limit 4");
while($duyuru_dizi=mysql_fetch_array($duyuru_cek))
{
?>
<div class="index_orta_sol_haber_resim">
<img src="lib/images/duyurular/<?=$duyuru_dizi['resim']?>" width="100" height="100">
</div>
<br>
<div class="index_orta_sol_haber_metin">
<?php echo substr($duyuru_dizi['aciklama'],0,400); ?><a href="duyuru_detay.php?id=<?=$duyuru_dizi['id']?>"> devamı...</a>
</div><br>
<?php
}
?>
<br>
</div>