Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Here is my site: http://destiny-game.info/carrentals/
As you can see in the header above the navigation bar there is a larger gap compared to the preview. How would I be able to get rid of this large gap.
Many thanks.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Have you modified the theme?
Yes I changed in the style.css so that the navigation bar was relative rather than fixed so that it would scroll down with the whole website. As you can see in the preview, the nav bar is fixed and does not scroll whilst my site, the nav bar does scroll down with the page.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I can see an inline style added to the <body> element, do you know why that is there?
No, Im sure that came with the template.
I See it. Look at your body tag You have Style=”margin-top:126px”
remove the margin-top:126px.
I’ve been trying to locate the body tag and the line “margin-top:126px” but I can’t find it at all in the theme folder. Whereabouts is it located?
Thanks.
It’s probably in your header.php file. I don’t think it something that wordpress added. It something that probably been added for testing or something. It not defined in your external style sheets. It been placed in the code that generated the body tag.
Yes i found “<body <?php body_class(); ?>>” in the header.php file however there is no margin-top nor is there anything similar which could be changed.
It shows up in your source code. Do you know how to use the development tools in the browsers ? You can see it there. I’m not sure where it coming from. is this a child theme ?
Do you any kind of grep tool. You can search the theme for it if you do.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
If it’s not in your header.php file code then it’s probably coming from JavaScript. Try deactivating all of your plugins to explore whether any could be responsible.
If you are using windows you can download windows grep. It will search the content of all your files in your theme and tell you which files contain that string.
Thanks for the replies. I used dev tool in firefox and i found if I edit this line for 64 to 1, there is no gap.
“<body class=”home page page-id-39 page-template page-template-page-templa…-php logged-in admin-bar custom-background customize-support” style=”margin-top: 64px;””
By modifying margin-top 64px to 1px, it got rid of the huge gap however I can’t find that line.
I tried using the grep tool you recommended however I could not find that string or any other related strings I tried. I also did what Andrew said and disabled all my plugins however that had no effect either.