Kamis, 03 Agustus 2017

Belajar Width CSS



Judul : Belajar Width CSS.
Tujuan : Mempelajari cara menggunakan width pada CSS untuk mengatur lebar.
Target : Dapat memahami struktur dari pemrograman CSS.

Setelah mempelajari Height CSS pada sesi sebelumnya, sekarang kita akan mempelajari mengenai Width CSS. Hampir sama dengan Height yang digunakan untuk mengatur dan menentukan tinggi pada tampilan, sedangkan Width digunakan untuk mengatur dan menentukan lebar pada tampilan. Pembasahan selanjutnya tentang CSS adalah tentang Background pada CSS.

<!DOCTYPE html>
<html>
 <head> 
  <style type="text/css">

  #lebar_min{
     min-width: 400px;
     background: red;
  }

  #lebar_max{
     max-width: 400px;
     background: red;
  }
  
  #lebar{
    width:400px;
    background:red;
  }

  </style>
  <title>Width</title>
 </head>

 <body>
  <p id="lebar_min"><b>CONTOH MIN WIDTH</b>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>
  <p id="lebar_max"><b>CONTOH MAX WIDTH</b>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>
  <p id="lebar"><b>CONTOH WIDTH</b>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>
 </body>
</html>


EmoticonEmoticon