cord
cord

Reputation: 75

Responsive screen size

Is there a way/code that I can us to make website fit all screen sizes without using media query in the CSS?

The style that I am using is the CSS Style, not bootstrap nor flexbox

Upvotes: 1

Views: 283

Answers (2)

Shafiqul Islam
Shafiqul Islam

Reputation: 5690

you can use

width:100% 

in your css file for responsive design then it will fixed but if you have 4 div and then you need to use 25% or less. it will work all section but if it is mobile device then total screen size is 500px as like then when you use

width:25%

enter image description here then 4 div will show very small size and it will not good to see this so if you use media query then it will look fine . but percent (%) will work for your purpose

Upvotes: 0

jaboja
jaboja

Reputation: 2237

You can use vh (1% of window height) and vw (1% of window width) units in your CSS definitions instead (and calc(...) desired values).

Btw. flexbox is CSS style and is the next thing you may consider.

Upvotes: 2

Related Questions