Click here to Skip to main content
15,072,391 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi... I am having problems with HTML and CSS. Im also farely new to both of them... So, the problem is that, when I zoom in/out or change the windows size, the layout changes and block elements stack on each other for no reason.

Code Below : (Had to put them in Nodepad documents cause. if I post the code here, the editor puts the code as a Web Page Would)

HTML: | Failu augšupielāde[^]

CSS: | Failu augšupielāde[^]

What I have tried:

I've tried to search on Google and there have been some resolves on the web, by adding max/mind width, but in my case they don't work... I don't know if im doing it wrong or what.
Updated 9-Aug-17 0:11am

1 solution

You need to make a decision as to how you want the page to change when you zoom in/out. Do you expect elements to scale with the page or have the page close around them.

The former must be handled by using scaleable CSS3 sizing types, like % (although now there are more) Scroll down to RELATIVE LENGTHS[^]. This can be difficult.

The later is somewhat easily handle by using position:absolute style and locating the items where you want on the page. Scaling the page (zoom in) will have you see less and less of the page content but it will stay where it is supposed to be.

Make good use of that link: it has HTML and CSS tutorials that will be quite helpful, including example that are live and allow you to test modifications.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900