Site logo

Archived topic

Custom HTML in sidebar not saving

11 replies · Started by Elle on December 13, 2017

Viewing posts 1–12 of 12

Hi,

I am trying to use custom HTML in the sidebar. I have created a paragraph style in custom CSS. When I add the class to the <p> tag in the custom HTML field, I see the changes. But when I save, it erases the class in the tag and reverts to the basic format. Here is the CSS:

p.sidebar-quote {
background: #F7F7F7;
text-align: center;
line-height: 200%;
padding: 30px;
margin: -38px;
border-radius: 10px;
}

One more issue, when I am in editing mode and *can* see the changes, the bottom margin is off. The left, top, and right are all -38, but not the bottom. It stays in a default it appears.

Any insight?

Thanks!

Hi there,

Can you show me the exact HTML you are trying to add?

Hi,

This is what I am putting in the custom HTML:

<p class="sidebar-quote">
<em>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. </em>
</p>

Just to confirm, are you using the "Text" widget or the "HTML" widget?

Hi,

I am using the "Custom HTML" widget.

It could be a plugin you're using causing the conflict.

It could also be due to your account - are you the main administrator?

Hi,

I couldn't identify a plug in conflict. Yes, I am an administrator of the account.

Any suggestions?

Hi,

Interesting! I was putting the code in the from the WP customize option on the hpage (paint brush icon), not the widget manager.

When I do it from the widget manager, it works! I did not think to do it that way. Thanks :)

One more question, I am trying to create a hairline border. I made the margin -38 to do that. It seems to be correct on all sides, except on the bottom. See the CSS at the beginning of this thread.

Is there a better way to do this?

Instead of doing all of the margin stuff, try this:

#custom_html-11 {
    padding: 10px;
}

Hi,

Thanks, this is a much better approach :)

You're welcome :)

This archived topic is closed to new replies.