0

I don't know but when I change the screen size my elements do not arrange themselves even though I have used meta viewport tag please visit my GitHub page https://github.com/SouradipMandal/Orgdal for understanding what's the problem I am talking about and please help me solve this issue.
Download the code and open the .html file in your browser and type "Benzene" in the input field and press "Enter" a output will come , now minimize the browser window and try to resize see what happens. Please help me fix this.
I will not be able to explain my problem to you until you yourself see the problem.

I had included the code above but for better again removed it. Open it from the link above by downloading it.

Souradip Mandal
  • 35
  • 3
  • 11

2 Answers2

2

change your Css to

#body {
    background: #000000;
    height: 100vh;
    width: 100%;
}
1

You are using vh and vw way too much and it's breaking the styling you have. I can not give you a fix for your styling. it will be too complicated.

And you are also using a display absolute everywhere. it's ok to be used, but if you depend on it, it will make your life harder when styling a page.

simple steps that can "help" a bit can be:

  1. removing the height and width values from the #body styling.
  2. change every vw and vh to % on the #screen styling.
  3. change the left property from 65 to 15 so it will be width : 15% (can be 20 or so).
  4. change the height value from the "display_top_margin" class to be about 60px and that should fix your top bar.
  5. the Max-width and Max-height are breaking your buttons on the "name_more_info" class.

I advise you to "Restyle the page again and try making it work without depending on vh and vw as units.

The difference between vh/vh and % is explained simply here: CSS Units - What is the difference between vh/vw and %?

Araz
  • 61
  • 2