-
kronfink
Hi guys,
i want a vertical header (not sidebar) and use the css of this site https://gpsites.co/sider/.
The problem is that the header should positioned to the left of content with only 40px space.
So it should not be fixed to the left edge of the screen.Some css pros here to help out?!
-
Alvind
Hi there,
Can you provide the link to the site?
-
kronfink
Hi Alvind,
the link is http://waldfriedhof.kronfink.com
should look like this -
David
Hi there,
its a tricky one, as the Site Header has a fixed position so it can’t easily reposition itself based on the screen size.
So it would mean applying a different method.
In your current CSS you have this CSS rule:
/* Vertical header */ @media (min-width: 1000px) { body { margin-left: 300px; } .site-header { position: fixed; left: 0; top: 0; width: 300px; z-index: 300; height: 100%; overflow: auto; overflow-x: hidden; -webkit-backface-visibility: hidden; -webkit-overflow-scrolling: touch; transition: .1s ease; } .admin-bar .site-header { top: 32px; } .site-header .main-navigation li { float: none; } }
Replace that with this:
@media (min-width: 1000px) { body { max-width: 1600px; margin-inline: auto !important; display: grid; grid-template-columns: 300px 1fr; } #page { width: 100%; } .inside-header { position: sticky; top: 0; } .site-footer { grid-column: 2; } .site-header .main-navigation li { float: none; } }
NOTE, in the top of the rule we set the
max-width: 1600px;
which is the overall max width of the Site Header + Content. Change that to wha you need.And fingers crossed 🙂
- You must be logged in to reply to this topic.