How can I improve width height in .html ?Like as need not big or small. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 59

How can I improve width height in .html ?Like as need not big or small.

About html.

6th May 2020, 7:05 AM
Nikhat Shah
Nikhat Shah - avatar
10 Answers
+ 16
I thinks use should you CSS Their are numerous properties which can give you the desirable effects.
3rd Jun 2020, 2:02 AM
Code Black Web(Gamer)
Code Black Web(Gamer) - avatar
+ 13
Use % or vw/vh instead of px or pt. width: 50% always sets the width half of the container and so on.
6th May 2020, 7:27 AM
Kashyap Kumar
Kashyap Kumar - avatar
+ 10
Use % or vw/vh instead of px or pt. width: 50% always sets the width half of the container and so on. Right 👍
8th May 2020, 12:56 AM
Nikhat Shah
Nikhat Shah - avatar
+ 5
Px is used to declare the height and width
8th May 2020, 4:38 AM
Sanika
+ 4
For example Width: 70% or 70px; Same goes with height
6th May 2020, 7:26 PM
Shola Micheal
Shola Micheal - avatar
+ 3
Using Relative units Over absolute may help you Try to use Relative units like vw,vh,% etc... instead of Absolute units like px,pt etc
8th May 2020, 5:22 AM
Aanchal
Aanchal - avatar
+ 3
width: 75% using % is more recommended
8th May 2020, 2:00 PM
Saidi Chembea
Saidi Chembea - avatar
+ 3
Use % in your code
10th May 2020, 12:06 AM
Yash Sharma
Yash Sharma - avatar
+ 3
if it is not fixed that how many px you need.. suppose you want to set the image/text half of the px of our page..then you have 2 choices 1) one by one check the px width,hight 2) set the width and height to 50% if you know the exact pixel then I prefer you to use px instead of % :) hope it will help you.
13th May 2020, 1:39 AM
Prasanta Banerjee
Prasanta Banerjee - avatar
+ 1
use % in html For example if want to use full width then use 100% Same thing for 100% for height You can use 100vh for height (vh = vertical height) Same things for width as well
9th Jun 2020, 4:50 AM
Coder
Coder - avatar