Site logo

Archived topic

Background ad

23 replies · Started by Martin on April 30, 2021

Viewing posts 16–24 of 24

Hi David,

Thank you. That's exactly what I needed. However, this solution deactivated some links to the main content of the site (eg author: admin, the first image in the article, the "learn more" button in the sidebar, etc.).

I used the solution from Ying she sent above.
# site-navigation, #page {
position: relative;
}

However, this solution does not work on the banner above the header that I have placed using the hook generate_before_header. Do you know how to fix this, please?

Thank you.
Regards,
Martin Steidl

Hi David,

thank you very much. It works now. I'm happy. ;-)

Have a nice day.
Regards,
Martin

You're welcome

Hi David,

you wrote: "DO NOT add any images to the HTML, as you already have your background image - this will just create the Links."

But, Is it possible to add an image to this code when editing the CSS code?

For example:


<div class="advert-parent">
<a href="https://www.seznam.cz/"> <! - advert link -> </a>
<div class="advert-filler"> <! - advert spacer -> </div>
<a href="https://www.seznam.cz/"> <! - advert link -> <img src="https://dlazbazamkova.cz/wp-content /uploads/2021/07/2.jpg" /> </a>
</div>

Can CSS be added for .advert-container lhs and .advert-container rhs? I need the left image to be anchored to the top right and the right image to be anchored to the top left. Images should be a fixed size. When you resize pages, they should not resize and do not move.

Now I see this:
https://dlazbazamkova.cz/prvni-prespevek/
I need it to look like this:
https://stavimbydlim.cz/prumerna-spotreba-vody-na-osobu/

Thank you in advance for your advice.
Have a nice day.
Regards,
Martin Steidl

Hi David,

you wrote: "DO NOT add any images to the HTML, as you already have your background image - this will just create the Links."

But, Is it possible to add an image to this code when editing the CSS code?

For example:


<div class="advert-parent">
<a href="https://www.seznam.cz/"> <! - advert link -> </a>
<div class="advert-filler"> <! - advert spacer -> </div>
<a href="https://www.seznam.cz/"> <! - advert link -> <img src="https://dlazbazamkova.cz/wp-content /uploads/2021/07/2.jpg" /> </a>
</div>

Can CSS be added for .advert-container lhs and .advert-container rhs? I need the left image to be anchored to the top right and the right image to be anchored to the top left. Images should be a fixed size. When you resize pages, they should not resize and do not move.

Now I see this:
https://dlazbazamkova.cz/prvni-prespevek/
I need it to look like this:
https://stavimbydlim.cz/prumerna-spotreba-vody-na-osobu/

Thank you in advance for your advice.
Have a nice day.
Regards,
Martin Steidl

Add this CSS to your site:

.advert-container img {
    object-fit: cover;
    object-position: left top;
    height:100%;
    width: 100%;
}

This will force both images to fill the space and left align them.
To if you want the left hand advert to align right then add this CSS as well:

.advert-container.lhs img {
    object-position: right top;
}

Hi David,

thank you for answer.

Unfortunately, as you zoom in and out on a Web page (CTRL + sroll), the images also resize.
Is it possible that the images are still the same size?

Check this: https://dlazbazamkova.cz/prvni-prespevek/

Thank you in advance for your advice.
Have a nice day.
Regards,
Martin Steidl

This archived topic is closed to new replies.