Adapting CSS to different screen sizes: A guide
P粉030479054
P粉030479054 2023-09-09 00:05:15
0
1
356

I have this CSS code and my problem is that due to thepadding-top(some space from the top) my page is too big causing it to have the "scroll" option and not fit the entire screen .

How can I disable the scrolling option?

* { margin: 0; padding: 0; } html, body { height: 100%; } body { color: #444; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f7f7f7; } .container { margin: 0 auto; width: 100%; height: 100%; padding-top: 20px; }

I tried addingoverflow:hidden;and it works but it cuts off some of the bottom divs

P粉030479054
P粉030479054

reply all (1)
P粉323224129

Addbox-sizing: border-box;to.containerto include the padding in the percentage value ofheight.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!