cara memasukan image dengan css
buat fail index.html buat fail style.css buat satu polder untuk menyimpan fail gambar
ferintah untuk cssnya
=========================================================
img.format1 { width:60px; height:60px; float:left;border:1px solid blue;border-radius:10px;}
img.format2 { width:100px; height:100px; float:right;border:3px solid red;}
img.format3 { width:120px; height:120px;;border:1px solid blue;border-radius:10px;box-shadow:5px;}
==========================================================
perintah di cssnya
perintah di htmlnya
dibawah ini scrif fullnya
index.html
=====================================
<!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>memasukan image dengan css </title>
<link rel='stylesheet' type='text/css' href='style.css'/>
</head>
<body>
<div id="halaman">
<div id="header">
<br> image dengan format css <br/>
<img src="image/barlianno.jpg" class="format1" alt="gb barlianno" title="text" />
<img src="image/barlianno.jpg" class="format2" alt="gb barlianno" title="text" />
<img src="image/kunkunmarkun.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/kunkunmarkun.jpg" class="format2" alt="gb kunkun" title="text" />
<img src="image/barlin_nadin.jpg" class="format3" alt="gb kunkun" title="text" />
</div>
<div id="kiri"class="semua_kotak1">
isi KIRI
<br> height:400px;
padding:10px;
background-color:#CCCCCC;
float:left;
width:250px;
margin-top:10px;
border-radius : 10px;
pakai class "class="semua_kotak1"
</div>
<div id="kanan">
isi KANAN
<img src="image/kunkunmarkun.jpg" class="format3" alt="gb kunkun" title="text" />
<br>
height:400px;
padding:10px;
background-color:#33FF33;
float:right;width:250px;
margin-top:10px;
tanpa class
<br>
<img src="image/barlin_nadin.jpg" class="format2" alt="gb kunkun" title="text" />
</div>
<div id="tengah"class="semua_kotak2">
isi TENGAH
<br>
height:400px;
padding:10px;
background-color:#CCCCCC;
margin:10px 290px 0 290px;
pakai class "class="semua_kotak2"
contoh gambar dengan format css
<br>
<img src="image/barlianno.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/kunkunmarkun.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/barlin_nadin.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/gundul.jpg" class="format1" alt="gb kunkun" title="text" />
</div>
<div id="footer">
FOOTER
</div>
</div>
</body>
</html>
=======================================
fail style.css
=======================================
@charset "utp-8";
/**/
.semua_kotak1 {font-family:tahoma, verdana; font-size:24px; color:red;}/*ini adalah class*/
.semua_kotak2 {font-family:tahoma, verdana; font-size:18px; color:blue;}/*ini adalah class*/
img.format1 { width:60px; height:60px; float:left;border:1px solid blue;border-radius:10px;}
img.format2 { width:100px; height:100px; float:right;border:3px solid red;}
img.format3 { width:120px; height:120px;;border:1px solid blue;border-radius:10px;box-shadow:5px;}
#halaman{
width:980px;
margin:0 auto;
background-color:#03438D;/*warna biru*/
}
#header {
height: 250px;
padding:10px;
background-color:#CCCCCC;
}
#kiri{
height:400px;
padding:10px;background-color:#CCCCCC;
float:left;
width:250px;
margin-top:10px;
border-radius : 10px;
}
#kanan {
height:400px;
padding:10px;
background-color:#33FF33;
float:right;width:250px;
margin-top:10px;
}
#tengah {
height:400px;
padding:10px;background-color:#CCCCCC;
margin:10px 290px 0 290px;
}
#footer { clear:both; height:40px;padding:10px; background-color:#CCCCCC; margin-top:10px;}
================================================
hasil broser
telah di uji coba di lab barlianno
semoga bermangfaat
kunjugi juga ke
www.barliannet.com
buat fail index.html buat fail style.css buat satu polder untuk menyimpan fail gambar
ferintah untuk cssnya
=========================================================
img.format1 { width:60px; height:60px; float:left;border:1px solid blue;border-radius:10px;}
img.format2 { width:100px; height:100px; float:right;border:3px solid red;}
img.format3 { width:120px; height:120px;;border:1px solid blue;border-radius:10px;box-shadow:5px;}
==========================================================
perintah di cssnya
perintah di htmlnya
dibawah ini scrif fullnya
index.html
=====================================
<!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>memasukan image dengan css </title>
<link rel='stylesheet' type='text/css' href='style.css'/>
</head>
<body>
<div id="halaman">
<div id="header">
<br> image dengan format css <br/>
<img src="image/barlianno.jpg" class="format1" alt="gb barlianno" title="text" />
<img src="image/barlianno.jpg" class="format2" alt="gb barlianno" title="text" />
<img src="image/kunkunmarkun.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/kunkunmarkun.jpg" class="format2" alt="gb kunkun" title="text" />
<img src="image/barlin_nadin.jpg" class="format3" alt="gb kunkun" title="text" />
</div>
<div id="kiri"class="semua_kotak1">
isi KIRI
<br> height:400px;
padding:10px;
background-color:#CCCCCC;
float:left;
width:250px;
margin-top:10px;
border-radius : 10px;
pakai class "class="semua_kotak1"
</div>
<div id="kanan">
isi KANAN
<img src="image/kunkunmarkun.jpg" class="format3" alt="gb kunkun" title="text" />
<br>
height:400px;
padding:10px;
background-color:#33FF33;
float:right;width:250px;
margin-top:10px;
tanpa class
<br>
<img src="image/barlin_nadin.jpg" class="format2" alt="gb kunkun" title="text" />
</div>
<div id="tengah"class="semua_kotak2">
isi TENGAH
<br>
height:400px;
padding:10px;
background-color:#CCCCCC;
margin:10px 290px 0 290px;
pakai class "class="semua_kotak2"
contoh gambar dengan format css
<br>
<img src="image/barlianno.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/kunkunmarkun.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/barlin_nadin.jpg" class="format1" alt="gb kunkun" title="text" />
<img src="image/gundul.jpg" class="format1" alt="gb kunkun" title="text" />
</div>
<div id="footer">
FOOTER
</div>
</div>
</body>
</html>
=======================================
fail style.css
=======================================
@charset "utp-8";
/**/
.semua_kotak1 {font-family:tahoma, verdana; font-size:24px; color:red;}/*ini adalah class*/
.semua_kotak2 {font-family:tahoma, verdana; font-size:18px; color:blue;}/*ini adalah class*/
img.format1 { width:60px; height:60px; float:left;border:1px solid blue;border-radius:10px;}
img.format2 { width:100px; height:100px; float:right;border:3px solid red;}
img.format3 { width:120px; height:120px;;border:1px solid blue;border-radius:10px;box-shadow:5px;}
#halaman{
width:980px;
margin:0 auto;
background-color:#03438D;/*warna biru*/
}
#header {
height: 250px;
padding:10px;
background-color:#CCCCCC;
}
#kiri{
height:400px;
padding:10px;background-color:#CCCCCC;
float:left;
width:250px;
margin-top:10px;
border-radius : 10px;
}
#kanan {
height:400px;
padding:10px;
background-color:#33FF33;
float:right;width:250px;
margin-top:10px;
}
#tengah {
height:400px;
padding:10px;background-color:#CCCCCC;
margin:10px 290px 0 290px;
}
#footer { clear:both; height:40px;padding:10px; background-color:#CCCCCC; margin-top:10px;}
================================================
hasil broser
semoga bermangfaat
kunjugi juga ke
www.barliannet.com
Komentar
Posting Komentar