Can't Get the Span Function to Work -...

User 563328 Photo


Registered User
85 posts

Help,

I am trying to use the span function to no avail. Here is an example of how I want to use it:

<p>JONES chart (villages of Dietel, Frank) - Commissioned by John Jones, 1234 W Magnolia St, Somewhere, CO 12345 jjones@msn.com <br /> <span>Purchase from: AHSGR, 631 D St, Lincoln, NE 68502</span></p>

On my external CSS file I have tried listing the span in the following 3 ways:


#1
body {
font-family: Verdana, Helvetica, Arial, sans-serif;
line-height: 18px;
background-color: #A7C8A6;
color: #004b6f;
span color: #0080C0;
}

#2
p { margin: 0 0 18px; span color: #0080C0; }

#3
span { color: #FF8000; }

#wrapper { float: left; width: 100%; }


What am I doing wrong?
User 463058 Photo


Ambassador
1,086 posts

#3 should change the color of the text within the span. #1 and #2 won't make sense to the browser, so they will just be ignored.

You can also style spans that appear within paragraphs by using this:
p span { color: #FF8000; }
User 563328 Photo


Registered User
85 posts

Hey Cary,

I didn't think either #1 or #2 would work. However #3 and your suggestion of the style span isn't working either. I made sure that I saved the css file after entering the code before going back and previewing the page. Every thing else is working correctly though, hmmmm.
User 563328 Photo


Registered User
85 posts

I am such a dork! I was just looking at the wrong section of the page.:P

Thanks.

Kelly

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.