AH-SID
Wisnu-WR Kalau masih ada sintaks css di atas tentu saja tag img tidak bekerja
, saya 'kan cuma tanya mana dari kedua tag img itu yang benar? Hehe..
Kembali ke topik, yang saya pahami bahwa sintaks CSS:
body img {
width: auto !important;
height: auto !important;
}
digunakan untuk mengatur semua gambar. Semua gambar akan diatur width dan heightnya sesuai sintaks tersebut, kecuali ada penggunaan !important pada tag imgnya.
Seperti:
<img src="url" style="width:200px !important; height: 200px !important" />
Copy code
atau seperti yang disarankan mr. Graham
Graham
Wisnu-WR It depends on where you want the images to automatically resize if it is just in your menu table on the main page try changing it to
table img {
max-width:100%;
height: auto !important;
}
Copy code
My research says that is a better code for responsive image resizing anyway but stick to your version if you wish as both seem to work
I still need to see a proper test example page with a image you are trying to resize to be sure
Wisnu-WR
AH-SID Saya sudah mencoba dengan width="5px height="5px" ataupun style="width:5px;height:5px" , tetap tidak bekerja
Wisnu-WR
Graham Jadi apa yang harus saya ubah ?
Graham
AH-SID Yes I had seen that And it may be what is the issue as it makes the image size responsive to the screen size and the constrains of the containing element (ie the image will resize automatically for smaller or larger screens) and the !important makes it override other css rules
AH-SID
Wisnu-WR Hm.. Saya lihat di wapmu ada sintaks css:
body img {
width: auto !important;
height: auto !important;
}
Copy code
mungkin itu yang menyebabkan width dan height pada gambar menjadi sulit diatur.
Tapi saya jadi ragu mengenai pengaturan width dan height ini.
Mana yang benar ya? (
balik nanya)
<img src="img.png" width="200" height="200" /> atau <img src="img.png" style="width:200; height:200;" /> ?
Graham
Wisnu-WR I cannot see anything wrong thats why I want a specific example
Wisnu-WR
Graham Semua di halaman saya, saya tidak dapat mengatur gambar menggunakan atribut width dan height. Dan sampai sekarang saya harus mengubah ukuran gambar secara manual dengan fitur convert image di xtgem.