• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[vBulletin] Username Font Size Messes Up

Photoshop Design
Loyal Member
Joined
Jun 20, 2012
Messages
871
Reaction score
473
Okay so here's my markup code and it works fine with a nice image background and red text:

<span style="color: rgb(186, 1, 1); background-image: url('http://imagelink.gif')">

And then I try adding this:

<span style="color: rgb(186, 1, 1); background-image: url('http://imagelink.gif');font-size:"10px";"> (From my HTML knowledge) and it just fucks up and the usernames for the usergroup disappear, so can somebody add the correct code on to my orginal markup to change font size please. :
 
Junior Spellweaver
Joined
Nov 22, 2004
Messages
123
Reaction score
21
Remove the " around "10px". You're ending the style attribute with the quotes.

Also, it is handy to use em as a size instead of pixels, that way if you ever change the default body style (adding other skins, etc) it will automatically resize to the new font.
 
Photoshop Design
Loyal Member
Joined
Jun 20, 2012
Messages
871
Reaction score
473
I'm sure I did it without the pixels previously. :/
 
Joined
Nov 17, 2008
Messages
800
Reaction score
1,392
He's talking about the quotations.

Code:
font-size:"10px";
should be
Code:
font-size: 10px;

Here's a quick lesson on quotation marks.

By the way, this goes for EVERY coding language (that I can think of).

When you use quotes in your code, they get paired by the closest ones together.
So, when one's open, the closest one to it will close it.

Code:
[COLOR="#0000FF"]"[/COLOR]This text is inside one pair of quotations.[COLOR="#0000FF"]"[/COLOR]

If you use the same type of quotations inside one, it's obviously not going to work as planned.

Code:
[COLOR="#0000FF"]"[/COLOR]Jim told me he was [COLOR="#0000FF"]"[/COLOR]running[COLOR="#FF0000"]"[/COLOR] to the bathroom[COLOR="#FF0000"]"[/COLOR]

As you can see by the highlights, the pairs of quotes are not the ones you planned on.

However, if you use single quotes inside double quotes, or visa versa, it works just as you want it.

Code:
[COLOR="#0000FF"]"[/COLOR]Jim told me he was [COLOR="#FF0000"]'[/COLOR]running[COLOR="#FF0000"]'[/COLOR] to the bathroom[COLOR="#0000FF"]"[/COLOR]

[COLOR="#0000FF"]'[/COLOR]Jim told me he was [COLOR="#FF0000"]"[/COLOR]running[COLOR="#FF0000"]"[/COLOR] to the bathroom[COLOR="#0000FF"]'[/COLOR]

So although font size doesn't require the value to be in quotes, you seemed to not understand how they worked.
 
Photoshop Design
Loyal Member
Joined
Jun 20, 2012
Messages
871
Reaction score
473

I tried that before, it didn't work so I added the quotation marks, I'll retry in a bit but I have a major issue atm on vBulletin. (Posted another thread for it).