Resim ile yazı aynı hizaya nasıl alınır?

Antares

Kilopat
Katılım
6 Ağustos 2016
Mesajlar
674
Makaleler
1
Çözümler
1
Daha fazla  
Cinsiyet
Erkek
Merhaba, resim ile yazıyı aynı hizaya nasıl alabilirim?

1623518880291.png


1623518916690.png
 
Bir div oluşturun, divin genişliğini resim genişliği ile aynı yapın. Yazdığınız yazılar div içerisinde alt alta sıralanır.
Örneğin:


HTML:
<!DOCTYPE html>
<html>
<head>
    <title>a</title>
</head>
<style type="text/css">
    .benimdivim {
        width: 300px;
        text-align: center;
        display:block;
        float:left;
        margin:5px;
    }
</style>
<body>

<div class="benimdivim">
<img src="https://via.placeholder.com/300x300">
  <h2>Bu Başlığımız</h2>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
</div>

<div class="benimdivim">
<img src="https://via.placeholder.com/300x300">
  <h2>Bu Başlığımız</h2>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
</div>
</body>
</html>

Görüntü:
1623521892576.png
 
Son düzenleme:
Bir div oluşturun, divin genişliğini resim genişliği ile aynı yapın. Yazdığınız yazılar div içerisinde alt alta sıralanır.
Örneğin:


HTML:
<!DOCTYPE html>
<html>
<head>
    <title>a</title>
</head>
<style type="text/css">
    .benimdivim {
        width: 300px;
        text-align: center;
        display:block;
        float:left;
        margin:5px;
    }
</style>
<body>

<div class="benimdivim">
<img src="https://via.placeholder.com/300x300">
  <h2>Bu Başlığımız</h2>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
</div>

<div class="benimdivim">
<img src="https://via.placeholder.com/300x300">
  <h2>Bu Başlığımız</h2>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
</div>
</body>
</html>

Görüntü:
Eki Görüntüle 1065983
Hocam dediğinizi yaptım ama istediğim gibi olmadı ve sayfayı küçülttüğümde responsive olması lazım müsait iseniz dosyayı atsam bakabilir misiniz?
 

Yeni konular

Geri
Yukarı