简体   繁体   中英

How to Make Sure that the Pure Static Website developed with Html and CSS works the same across all the devices?

I am doing web homework and the task is to replicate a webpage but with entirely HTML and CSS. The webpage should be static and should not resize as the browser window is shrunk. The problem I am facing is how can I make sure that the website will run the same on every device because the webpage looks different on my device and different on my friend's device.

I have used pixel values in CSS (not %) to implement the positioning of elements in the webpage.

Unfortunately, I cannot share the code on this platform.

Can someone help me point out how can I achieve the above mentioned with only HTML and CSS?

I believe it is happening because you and your friend are rendering the page in different browsers. WebKit & Mozilla rendering engines implement line-height differently. I suggest you add Firefox, chrome and any other browsers css specifically wherever there is a conflict in display in styling of element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM