Site logo

Archived topic

Backround Images-Content

21 replies · Started by Gerd on February 22, 2019

Viewing posts 1–15 of 22

Hello,
Sorry, I can not speak English well.
I am currently building a website.
I uploaded a picture under the menu point Backround Images-Content. But I do not want the image on a certain page. Is there a css code?

Many thanks for your help

Hi there,

each page or post has a unique ID which can be used.
If you edit a Page you can get the ID from the URL in your browser, if its a Page or a Post it will look like this: post=899

So for his page the CSS would be:

.page-id-899 {
    background-image: none;
}

If it was a Post then the CSS would like this:

.postid-899 {
    background-image: none;
}

Hello David,
thanks for your answer. your code only works with a background image. But I mean the image of the menu item content.
On this page the picture should be: https: //gasvergleich-check.de
No image should be on this page: https: //gasvergleich-check.de/gas-tarifrechner/

greeting gerd

Aah sorry :)

Try this:

.page-id-126 .inside-article {
    background-image: none;
}

Hallo David,
your support is great.
Many Thanks

Glad to be of help :)

Hallo David,

removing the content image from the pages went well. I would like to have a blog on my site now. Which code do I have to take there?
Here is the page: https: //gasvergleich-check.de/gasvergleich-blog/

greeting gerd

Hi there,

you would target this class: .blog .inside-article

As a note you can group common rules together eg.:

.page-id-401 .inside-article,
.page-id-126 .inside-article, 
.blog .inside-article {
    background-image: none;
}

By comma separating each of the selectors they can all share the same properties :)

Hi David,
Thank you very much
It worked.
How is the code in comments?

Not sure what you mean? Do you mean:

/* I am a CSS Comment */

Add this: .separate-containers .comments-area into your list of selectors :)

That's the code?:.separate-containers .comments-area .inside-article{
background-image: none;
}
That does not work

inside-article is not required e.g:

.separate-containers .comments-area {
    background-image: none;
}

Hi David

The code goes. Thank you
Please have a look at the code for this page: https: //gasvergleich-check.de/2019/02/

This archived topic is closed to new replies.