MyBB Community Forums

Full Version: MyCode Styling Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I want to create styling codes. For example I want to use [h3] [/h3]

I have this code :

Regular Expression
\[H3\](.*?)\[/H3\]

I want to use those stylings when h3 codeĀ is applied
.h3main {
text-shadow: none;
font-size: 14px;
font-weight: normal;
padding-bottom: 5px;
margin-bottom: 2px;
color: #b69d4b;
}

.h3main span {
background: #b69d4b;
padding: 4px 8px;
border-radius: 2px;
color: #FFF;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04);
}

What should I write as replacement?
Hi,

The replacement should be something like the following to work with the CSS you included:

<span class="h3main"><span>$1</span></span>
Thank you so much, its almost perfect.

Only thing is, when I use bigger font than I am supposed to, it looks like this :

[Image: Vajk3n.jpg]

Is there a way to fix it?
Hi,

You could change the CSS so that both selectors have:

display: inline-block;
Yes thank you, after adding this and changing padding from 4px 8px to 2px 4px it looks decent.