Site logo

Archived topic

Attention box - theme feature or plugin?

7 replies · Started by vemvem6 on August 27, 2017

Viewing posts 1–8 of 8

Hi guys,

I'm new to WP and to this theme. I found a site that is using your Theme and I am wondering if the in-text effect is a feature of your theme or some WP plugin - I would appreciate your help.

Site is: https://stronglifts.com/barbell-row/ and there is a yellow box with text starting: "Free: download my Barbell Row checklist Read more https://stronglifts.com/barbell-row/""

Much thanks!

Hi there,

That can be done with some HTML and CSS.

So try this in the page content:

<div class="yellow-box">
    content here
</div>

With this CSS:

.yellow-box {
    background: none repeat scroll 0 0 #ff9;
    clear: both;
    overflow: hidden;
    border: 1px solid #e5e597;
    margin-bottom: 25px;
    padding: 20px;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Thanks Leo! I installed Simple CSS and it worked!

I have a follow-up question though - it seems that content inside the box has a bottom margin of 25px (possibly because the content inside is a <p> paragraph).

1) Should I adjust <p> in main css file or via Simple CSS as overwriting?
2) Is there an equivalent of Simple CSS that I could use for the main stylesheet?

I have some CSS experience but I'm happy to get more

Thanks Leo!

1) I was referring to the paragraph content inside the box. I said it was 25px, but now when I was checking it was 32.3. I attached a screenshot here http://imgur.com/a/ixMNW. I would like to eliminate that 32.3px space.

2) You're right :) I didn't realize

Try this

.yellow-box p {
    margin-bottom: 0;
}

You're a savior Leo! Thanks!

You're welcome :)

This archived topic is closed to new replies.