I need to get my website to fit the screen

后端 未结 3 1704
执念已碎
执念已碎 2021-01-25 23:20

I have created my website as a fixed layout, with a width of 1600px, but the webpage on a smaller resolution looks too big. What am I supposed to do to make it looks good in ev

相关标签:
3条回答
  • 2021-01-26 00:00

    Your options:

    • Use a narrower fixed width. Staying under 1,000 pixels is fairly safe though not perfect
    • Use percentages for page width instead, though this is difficult if you need to have a set width for child elements to look right
    • Do a combination of the above and use media queries in your CSS to make your site responsive. It'll fit every screen width you specify AND you'll have full control over your layout at each trigger point.

    Here is a great resource for learning about responsive sites - this is the way to build a modern website, so though it might seem confusing it's worth every minute you spend on it.

    http://bradfrost.github.com/this-is-responsive/resources.html

    Good luck.

    0 讨论(0)
  • 2021-01-26 00:01

    Use relative measures, like width: 100%. You can constrain this even more by using min-width and max-width.

    Apart from that, you can use CSS media queries to make styles that only apply if certain conditions are met, like a minimum or maximum width. If you use that, you can change the whole look and feel of your website, for instance by hiding parts on smaller devices or change from a 2 column to a 1 column text presentation on smaller devices.

    0 讨论(0)
  • 2021-01-26 00:01

    A percentage-based width would change the width depending on the screen size, but you should also use min-width to ensure the page doesn't become too thin that it ruins your content.

    0 讨论(0)
提交回复
热议问题