Home >Web Front-end >HTML Tutorial >How to prevent elements from moving when the browser becomes smaller_html/css_WEB-ITnose

How to prevent elements from moving when the browser becomes smaller_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:20:271162browse

Browser

Just like the title. . . .


I have tried some methods such as resize() but can't solve it. .

Can any expert please give me some advice? Urgent

Reply to the discussion (solution)

I am a newbie, I encountered the same problem at the beginning. question.
When the browser becomes smaller, the web page will be deformed.

Just use a big DIV to wrap all the tags.

Isn’t it enough to specify the width? 》

body{width:100px;
height:100px;
margin-left:auto;
margin-right:auto;}
That’s it

Don’t use pixel PX
Use PT

Imagine using a set of templates from PC to mobile phone... it’s difficult


Put all the content on the web page into

all content


Put all the content on the web page into

All content

The author's language is not good enough, "prevent... from moving the position"?
I don’t know whether you want the elements to move or not to move when the browser becomes smaller.
To move, use relative length units.
If you don’t want to move, use absolute length units.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn