Reputation: 2649
On a web page I'm working on I have a fixed #top section containing the nav which is causing the content below to partially hide behind it.
The page is this: http://s361608839.websitehome.co.uk/pt-build/templatebuild/
I've tried adding margin-top to #slider and margin-bottom to #top to try and push each other apart but none of those have worked.
Any ideas?
Upvotes: 5
Views: 35866
Reputation: 6019
You can use
div.anythingSlider{
position: relative;
top: 50%;
transform: translateY(-50%);
}
top: 50%
will shift your content down while translateY
will put it back in place.
Upvotes: 1
Reputation: 8527
just change
div.anythingSlider {
position: relative;
padding: 110px 350px 28px 45px;
}
I changed the top padding from 0 to 110px
Upvotes: 3
Reputation: 9121
Your #top
is fixed
, so the margins won't work.
You have to do two things to fix this problem:
body
a padding-top
or margin-top
equal to the height of #top
(151px)#top
a top:0;
so it still sticks to the top of the page.Upvotes: 2
Reputation: 51807
just add top: 0;
to #topwrap
and margin-top: 100px
to body
. (replace 100px with a value you like, 100px is the minimum to see the first heading, but your #topwrap
is 151px tall - just try wich looks best)
Upvotes: 0