Archived topic
Image Placed On Page Header and Content ?
5 replies · Started by Ford on April 18, 2021
Hi there,
How do I place an image in both the page header and content? An example of what I'm exactly talking about is this: https://imgur.com/a/3lWkV21
Thanks!
Hi Ford,
Would that be for all static pages or just this page?
Let me know :)
Hi, sorry for taking a while to get back to you guys but for all static pages :)
Hi there,
Hi, sorry for taking a while to get back to you guys but for all static pages
Will the image be the same for all static pages or it varies depending on the page?
Let us know.
I'd like the image to vary depending on the page, thank you.
Ah i see.
You can keep how you're adding the image within the content. (adding the image block at the top most part of the content for every page)
You then add this CSS:
@media (min-width:1025px){ //for larger desktops
.wp-block-image:first-child {
margin-top: -75px;
}
}
@media (min-width:769px) and (max-width:1024px){ // for small desktops and tablets
.wp-block-image:first-child {
margin-top: -70px;
}
}
@media (max-width:768px){ //for mobile
.wp-block-image:first-child {
margin-top: -55px;
}
}
Adjust the values to your preference.