Current time: 04-23-2014, 12:38 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Background image/color
03-02-2010, 02:46 AM
Post: #1
Background image/color
Here are two MyCodes I just came up with.

One is to add a background color to text, the other is to add a background image to text.

Background Color
Name:
Code:
Background Color

Regular Expression:
Code:
\[bg=(.*?)\](.*?)\[/bg\]

Replacement:
Code:
<span style="background-color: $1;">$2</span>

Output:
   

Background Image
Name:
Code:
Background Image

Regular Expression:
Code:
\[bg color=(.*?) image=(.*?) position=(.*?) (.*?) repeat=(.*?) padding=(.*?)\](.*?)\[/bg\]

Replacement:
Code:
<span style="background: $1 url($2) $3 $4 repeat-$5;padding: $6;">$7</span>

Output:
   
Visit this user's website Find all posts by this user
Quote this message in a reply
03-03-2010, 11:31 AM
Post: #2
RE: Background image/color
Nice. Thanks.

<snip - "too big"> despite many sigs on here being much larger and approved - sort it out instead of removing sigs without warning
Find all posts by this user
Quote this message in a reply
03-03-2010, 12:24 PM
Post: #3
RE: Background image/color
Cool but I won't be using it Toungue.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-03-2010, 05:00 PM
Post: #4
RE: Background image/color
Lol, whats the point of having an image and a color?

GooglePlus - Circle me! | Twitter - My random tweets.| YouTube - My semi-funnish videos.
Find all posts by this user
Quote this message in a reply
03-03-2010, 05:08 PM
Post: #5
RE: Background image/color
Like if I used the thead image, it would just keep repeating itself. So you can set a background color with it and make it just repeat x direction and it would be like the regular .thead.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-08-2010, 02:08 AM
Post: #6
RE: Background image/color
Dam i made this but its all in one Sad
Only if i knew it already existed =\
Find all posts by this user
Quote this message in a reply
05-09-2010, 08:28 AM
Post: #7
RE: Background image/color
Nice one Joshee,very useful Smile.
Btw can u add a option for text-color using the first example?
background-color + text-color.
Thx in advanced.
Find all posts by this user
Quote this message in a reply
05-09-2010, 10:57 PM
Post: #8
RE: Background image/color
Code:
\[bg=(.*?) color=(."?)\](.*?)\[/bg\]
Code:
<span style="background-color: $1;color: $2;">$3</span>

Should work.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication