CSS and Codes to Apply
#1
For those of you who wants to style tables, divs, etc. without using a BUNCH of coding consistantly, you need to use CSS.
The problem is CSS can only be applied if HTML is on. But HTML is also could be dangerous in a forum. So I made up a couple of codes to make CSS.

First off, we need to enable the usage of CSS.


How it works:
Well, [css] acts like <style type="text/css"> and [/css] acts like </style>
when entered a value, in CSS format, the CSS code SHOULD be made.


Simple Expression
\[css\](.*?)\[/css\]
HTML Replacement
<style type="text/css">$1</style>

Now that you enabled CSS, you need to enable the ability to apply it.

You need to apply to objects...
Here are some objects you may want to apply it to:
Table
Div
Table Rows
Table Columns
Images
Textareas
Paragraphs


Now, there are others but those are the mains.

Now, if you have some pre-inserted MyCodes that you want to have CSS applied to do this:
1. Go to the code
2. Where it is simple expression put
\[YOURCODE css=(.*?)\]
(please note there are spaces, this is important)
3.In the HTML Replacement however, you need to change it a bit.
<YOURCODE name=$1>
Now anything after that needs to be changed in the right order $1 to $2, $2 to $3, etc.

4. Save and Test


Now if you want to make new codes...
Do the same as above...
(with the steps from above, use your own name for a BBCode if you'd like... rember, USE \ BEFORE [ AND ])
Table's HTML Code is
<table>$1</table>

Paragraph's HTML code is:
<p>$1</p>

Div's Code is:
<div>$1</div>

Table Row's Code is:
<tr>$1</tr>

Table Column's Code is:
<td>$1</td>

Image's Code is:
<img src="$1">

Textarea's code is:
<textarea columns=10 rows=10></textarea>
(nothing between> and </textarea>)



Confused? Just say so, tell me where I confused you!! Thank you for sitting around for that long tutorial!

Also, can you rate my tutorial out of 10, I haven't gotten much feedback from any of my posts, I just need to know where I stand THANKS!
http://community.mybb.com/thread-99571-p...#pid726699
I wanna a response to that thread... any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)