Hey, I’m looking for some advice regarding post customization.
I have a website and I want to instert different colorful div sections to some of my wordpress posts.
The idea is similar to brian dean’s blog where he uses some really amazing div section in his posts. (Check out the brian dean’s post: https://backlinko.com/mobile-seo-guide)…
In this post I saw different-different div section that makes that content more attractive… I also want to do s the same
if you provide a link to your site and indicate the sections and
the background colour which is to be applied to each, then
members may be able to assist you further with your project.
Please add the following CSS to the bottom of your custom stylesheet (which should also be the last stylesheet in the cascade) and see if this is the general idea. I’ve listed 5 colors that will repeat in the same order down the list of articles. You will probably want to modify the padding inside the boxes so the edges of the three column section are more appealing but that’s a different issue that you may be able to handle by yourself.
But the effect is anywhere… I mean I don’t want the div for entire post. I want to add wherever I want to add it.
You can understand it with an example of button. For example, I have added some code for button and whenever I call the button class from WordPress post edit area.
With the outline you can see where the articles and asides reside.
If you want to apply a background-color to one or more specific articles, all you have to do is target (address) the particular article(s). Because these articles do not have background-colors assigned, adding a background color to any of them is a matter of addressing the specific article. Because an ID can only appear once on a page, and the articles are already assigned IDs, find the ID of the article that you want to color and add the background to the ID. For example, the first article could be addressed from your custom CSS by ID like this:
#post-3834 {
background-color:#fcf;
}
OR by className like this: /* conveniently the className is the same as the ID in this case */
.post-3834 {
background-color:#fcf;
}
You should learn how to read and write enough HTML and CSS to understand how your site functions and how to make minor stylish changes.
If these examples do not mean anything to you… if you do not know how to use these examples to modify the look of your site, please be very specific about whatever changes you wish to see. I am not psychic.