Click here to Skip to main content
16,018,158 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have created one HTML design containing rectangular boxes on hover of which it displays content. It looks proper on my screen (1600x900) but on bigger screens like 1900x1080 design gets displaced.


P.S: we do not have responsive UI for our website.

Any solution or guidance will much appreciated
Thanks in advance.

Regards,
Mandar

What I have tried:

I tried viewport
<meta name="viewport" content="width=device-width, initial-scale=1.0">

but it doesn't work.

max-width:100%;
max-height:100%;

even this didn't work.
Posted
Updated 15-Apr-16 18:51pm
Comments
Sergey Alexandrovich Kryukov 16-Apr-16 0:38am    
This is not "resolution"; this is the size of the screen in pixels; and resolution is a very different thing. Your design should not adhere to this size, but to the size of client part of the browser window, which should be anything and change at any moment of time.

To achieve this, you have to build whole layout logic, which is not just two lines of CSS.

—SA
MandarKhedekar 16-Apr-16 0:43am    
Thank you so much for your reply.

Actually I have deigned one image in our SharePoint portal in one content editor webpart. Can you suggest something like references or some links where I can find some guidance to achieve this.

thanks in advance.
Sergey Alexandrovich Kryukov 16-Apr-16 0:56am    
The most convenient yet comprehensive reference source (with set of manuals) I ever used is Mozilla MDN: https://developer.mozilla.org/en-US/docs/Web.

Using official W3 documents and drafts is also useful.

If you look at my few JavaScript articles, you will see that most demo and applications more or less accurately adjust to the window size. Basically, CSS can handle all horizontal layout, but perfect vertical layout of the whole page scope (simpler put, to keep some bottom portion at the bottom of the page, without scrolling the page except for smallest window sizes) may need some JavaScript handling window.onresize event. I tried to accurately isolate layout code from other parts of code, so you can easily find what techniques to use.

—SA

1 solution

 
Share this answer
 

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