MyBB Community Forums

Full Version: Request: Custom frames or tables etc.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I wan to create a mycode to create a frame.
I added this to global.css

}

marquito {
	background: #F6F6E9;
	border: 1px solid #ccc;
	margin: 30;
	padding: 30px;
}

next I added this to mycode:

\[MARCO\](.*?)\[/MARCO\]

and
<marquito>$1</marquito>

but dont work,
only appears [MARCO]blah blah blah[/MARCO] in the posts, without the frame (border 1px solid #ccc, etc. etc.). How I can solve this?

Thank you.
why you added
}

marquito {
    background: #F6F6E9;
    border: 1px solid #ccc;
    margin: 30;
    padding: 30px;
}

You should add
marquito {
    background: #F6F6E9;
    border: 1px solid #ccc;
    margin: 30;
    padding: 30px;
}

Also, what you mean to add a frame ?
Did you mean a border around text or such ? OR kindly give me an examply
you have to call css with div tag not just marquito.
First, in the CSS, instead of
marquito {

enter:
.marquito {

Next, for the mycode regular expression enter:

\[marco\](.*?)\[/marco\]

Finally for the replacement enter:

<div class="marquito">$1</div>

Couple of things to note:
- When you create this mycode and test it on the custom mycode admin page, it will not show properly, this is because the global css doesn't load up in the admin cp, it will work though in the posts, so to test it you'll have to use it in posts.
- You can swap out div with span in the replacement depending on your need.