Website has huge whitespace on right side of the page and of the header when the page is resized to a smaller width

StackOverflow https://stackoverflow.com/questions/20271677

Вопрос

I have tried a lot of solutions listed here in stackoverflow, but I couldn't solve this issue.. this is a wordpress website. http://www.delice-ikbal.com/

I have tried to remove any margin or padding from the <html> and <body> It didn't help.

I've also tried something like :

html,body
{
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    overflow-x: hidden; 
}

overflow-x: hidden of course doesn't allow to scroll horizontaly.. so the content is not visible totally when the page width is getting smaller

So I would like to remove the white space existing on the header and the right side of the page.

Thank you.

Это было полезно?

Решение

You have a lot of containers with hardcoded width in px.

Remove max-width: 1080px in .main-navigation, it's the container which cause the issue.

EDIT: and in div.nav-menu > ul

ul.nav-menu, div.nav-menu > ul {
   margin: 0;
   padding: 0 40px 0 0;
}

Другие советы

Use this css

.site-header {
    background-image: none;
    background-color: rgb(36, 17, 0);
    min-width: 1000px;
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top