Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test Forum

Home » Forum » x-Forum » Question

CSS to make images 100% in width

html, body {
    position: absolute;

Posted by Ravelo 2018-09-10 19:23:57

Hi Ravelo,

If you want to make width of images 100% then you should put following code in your css file:-

width: 100%; //it will cover ur screen


width: 500px; //if you want image width 500px;

C++ user image Admin posted 2018-09-10 19:29:10

If you want to make width of images 50% 
width: 50%; //it will cover ur screen


width: 200px; //if you want image width 200px;
here online web tutorial is https://www.welookups.com

C++ user image aditya12 posted 2018-09-12 20:48:22

If you want to make all your image 100% you can do something like this
width: 100%;

But if you want to make some of the images 100% them use a Class  or an ID

Something like this..

<img src ='./img/image.jpg' class="100" />

now do something like this in the CSS..

img .100{
width: 100%; 

C++ user image kwedbh posted 2018-09-19 15:44:24

 max-width:100%; or width:100%;

<img src="sketch.png" class="image" />

MVC software development companies: http://www.ifourtechnolab.com/microsoft-technology	

Sherin Mathew
MVC Developer at iFour Technolab Pvt. Ltd.																					

C++ user image Sherin posted 2019-04-03 23:22:42

Your Answer

Ask New Question