Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


Changing text and background colors in MySpace?

On my friend's myspace profiles they have a color box around their comments and the text is in diffent colour too. I've asked them how they did it but they say they forgot. so how do you do it.


Dave's Answer:

Great question, actually, and one that lets me write about the basics of changing the text color and playing with background colors on MySpace and anywhere else you can add HTML comments!

There are two ways to approach this: you can use the "old school" way of using the FONT tag, or the fancy new CSS way which is far more flexible, but a wee bit more complicated. I prefer the latter because it gives you soooo much power, but let me start by showing you how to change text color with the FONT tag:

Only one word in this sentence is <font color="blue">blue</font>

That's the basic approach to making a word, phrase, or paragraph change color. Instead of "blue" you can use a range of different color names, or if you want to put on your geek hat, you can also specify what's called a hexadecimal RGB value. Those are more complicated -- blue would be #0000FF for example - but I also have a handy reference chart to help.

The problem with using the FONT tag is that you can't change the background color of the text, so you can't do anything cool like white text in a black box. With CSS you can do that and a ton more. Just about any HTML tag can include CSS formatting information, but a good technique is to use SPAN for inline changes and DIV for block changes. That is, if you want to just change one word in a sentence, that's a job for SPAN, but if you want to change an entire paragraph to, say, have a different background color, that's a DIV task.

Here's that same simple example with CSS:

Only one word in this sentence is <span style="color:blue;">blue</span>

Not too dissimilar, but what's cool is that you can now change things like the background as part of that style specification, you just separate attributes with a semicolon:

Only one word in this sentence is <span style="color:blue;background-color:#fcc;">blue</span>

(#fcc is a light red. #fff is white and #000 is black). Here's how it looks:

    Only one word in this sentence is blue

Nice, isn't it? Now if we do the exact same sequence with a DIV tag, you'll see what happens:

    Only one word in this sentence is

blue

Quite different. Now you can see how a "block" is really a paragraph. But the DIV tag is quite useful too because you can use it to create attractive blocks of information, like this:

   

This is an example of the slick formatting you can produce with basic CSS that will work in a MySpace comment, in a Blogger weblog entry, just about anywhere you can enter HTML. And it's easy too!

How did I do that? Well, it's a little bit more complicated, but here's the source:

<div style="border:3px solid red; padding: 4px; background-color: #333; color:#fff; font-size:110%">This is an example of the slick formatting you can produce with basic CSS that will work in a MySpace comment, in a Blogger weblog entry, just about anywhere you can enter HTML. And it's easy too!</div>

The red border is produced with border: 3px solid red, the gray background is produced with background-color:#333, the text is turned white with color:#fff (if you want to use "text-color" it'll fail, but I admit, I often type that in without thinking and have to fix it too), the spacing between the text and the edge of the box is expanded just a little bit with padding:4px and, finally, I make the text just a little bit larger with font-size:110%.

There are a million ways you can tweak HTML with CSS elements to get the exact result you seek, so it's far more than I can detail here, but I will tell you that I have a book that steps you through each and every CSS attribute, with examples, that you can find at your local bookstore or here online: Creating Cool Web Sites with HTML, XHTML and CSS. It might be a great way to get the results you seek.


More Useful Twitter, LinkedIn and Social Network Help Articles:
✔   How do I search for a job on LinkedIn?
This may be a bit obvious, but I'm looking for work and am unclear how I can use LinkedIn to find positions other...
✔   Add a header graphic to my Twitter profile?
I heard from a colleague that Twitter's added profile pictures a la Facebook's timeline photo on the top. Nice, but how do I...
✔   Export LinkedIn Profile as a PDF Resume?
I've spent the last year or two updating and adding to my LinkedIn profile and it has a ton of information about me....
✔   How do I block an iPad app from accessing Twitter?
My son installed an app on my iPad and now it's posting updates on my Twitter account when he plays. What the deuce?...
✔   Repost a Facebook photo on Instagram?
I post a lot of photos on Facebook and sometimes want to share them with my Instagram followers. You can automatically mirror an...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  









Reader Comments To Date: 19

mimi said, on May 18, 2007 7:54 AM:

please! no more myspace articles! how about stuff that appeals to a wider age range of people, or at least tips on a website that DOESN'T suck! Dave, you're a smart guy, and we're smart people, please help us with stuff that can really increase productivity.

Dave Taylor said, on May 18, 2007 10:54 PM:

Mimi, thanks for your feedback! I have a lot of MySpace readers, so I try to help out when I can, but I also have a LOT of other material that shows up every week too. What specific topics did you seek?

Simon Jackson said, on July 18, 2007 7:11 AM:

I've accidentally changed my blog titles to the background colour, so they're now invisible. I've tried changing every font colour in edit profile, but none of them seem to make the actual blog title visible, although I can easily change the 'more' link after the title. Any ideas where I might be going wrong?

Thanks,
SJ

shernei said, on August 6, 2007 6:34 AM:

if i make my back ground black
how can i change my comments to white?
xxx

kaydee said, on November 18, 2007 8:28 PM:

hey i was wondering if you would be able to let me no how you can change the colour of you columns and that bit around it? I have an actual background colour wich i want to keep, but i want to change the inner white part of it to another colour. could you help me? thanks.

Derek said, on December 3, 2007 5:26 PM:

Hey i need some help...

I am redoing a profile for a friend, and i have a dark background, that makes it very hard to read the comments posted on the profile. Is there an easy trick to changed the font color from black to white? myspace beta editor has no option for this, and i dont like thomas' editor.

lacey said, on February 11, 2008 9:23 AM:

i changed my layout and its magenta but my about me box is still lime green how do i change it?

marjorie said, on March 18, 2008 3:46 AM:

This is an example of the slick formatting you can produce with basic CSS that will work in a MySpace comment, in a Blogger weblog entry, just about anywhere you can enter HTML. And it's easy too!

ghay said, on June 11, 2008 12:26 PM:

thanks :D it truelly helps ! :D

Christine said, on July 10, 2008 3:09 PM:

hey i already knew this was possible for myspace, but do you have any tricks like these for facebook because they dont work there

melissa said, on November 13, 2008 8:36 AM:

i cant get on myspace at school cause they blocked it can u help me get on?

ozy said, on December 10, 2008 11:35 PM:

thank 4 ur teaching
i learn many at here...
thank...

Joshua said, on January 26, 2009 5:53 PM:

Hi Dave,
I need to delete a person who "added me as their pet" with a special application under the "GulfWarLegal" myspace site. This is important, but it has been since summer of last year that I last used this site and I've forgotten the password and email address since then. Can you help me? I'll even pay for your help. Thank you, Josh

Jessica said, on May 10, 2009 4:37 PM:

Hey. um. how do you write things and cross of some of the words?? i mean like putt a line in the middle of the word.

Dave Taylor said, on May 10, 2009 5:17 PM:

Hi Jessica! You want the "STRIKE" HTML tag. You can use it by putting <strike> before what you want crossed out and </strike> afterwards.

Laura said, on June 18, 2009 1:42 PM:

thank you for putting this on here.
it is kind of confusing.
i was wondering how to put a border around your about me section, or your heroes, or any section. just like a different colored border. if you could tell me, i would really appreciate it. thanks(:

Kerry said, on July 9, 2009 5:48 PM:

Hello Darling Dave.
I love ALL your codes they help me so much. THEY help me get on with my day to day myspacing life. I wish I could somehow meet you.

Ashlie Marie Alvarez said, on September 28, 2009 6:04 AM:

Dude, this stuff is very helpful. Gracias, thanks man(: This be fantastico xD I always wanted stuff like the background, but the border? That's just beyond it all:3 <3

Elizabeth said, on December 12, 2009 4:26 PM:

I have had a myspace for several years and obviously started out w/profile 1.0, but I don't want to switch to 2.0-don't like it!! My question? How can I change just my background, but WITHOUT MESSING UP or DELETING my individual typed stuff(about me, who i would like to meet, ect)?? I know if there is a way, you would know!!!!! And I'm totally SCARED to try it on my own or just figuring it out,though it would give me much gained knowledge and having to start my profile ALL OVER! HAHAHA

Thanks, E

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.