hr tag responsive based on screen size

i used hr tag. i give 30% width to hr tag. as i zoom my screen, width of hr tag is remain same .and when i small my screen width remain same.

hr tag responsive based on screen size but i want responsive width based on page size . how can i do ?? when i zoom in i want width of hr tag also small. i attached 2 image. first is screen size is 100% and second one is screen size is 50%.

hr tag responsive based on screen size

Can you post a bit more code? Looks like your hr tag is nested as a child inside another element with a specified width. This means that giving it a width of 30% will produce a width relative to said parent container instead of the screen width.

If you need a quick-fix, you can use 30vw, which can give you the desired effect, but I wouldn't advise that. You need to make sure your code is structured properly to avoid any unnecessary surprises in the future.

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image