6 Replies - 955 Views - Last Post: 04 October 2017 - 02:30 PM

#1 JamesBond007123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 03-October 17

Font Color in css

Posted 03 October 2017 - 01:14 PM

I hope this is a simple question.

How do I make only the font color of the Phone number Green?

Here is a sample:
(see Example 3)
http://schema.org/LocalBusiness

<div itemscope itemtype="http://schema.org/LocalBusiness">
<h1><span itemprop="name">Beachwalk Beachwear & Giftware</span></h1>
<span itemprop="description"> A superb collection of fine gifts and clothing
to accent your stay in Mexico Beach.</span>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">3102 Highway 98</span>
<span itemprop="addressLocality">Mexico Beach</span>,
<span itemprop="addressRegion">FL</span>
</div>
Phone: <span itemprop="telephone">850-648-4200</span>
</div>

I need the text "Phone:" and "850-648-4200" to be a Green color font

I tried different methods that work on a webpage, but when I browse on a mobile
phone only the text "Phone:" is Green and the "850-648-4200" remains Blue.

I need the "850-648-4200" to have the same font color Green.

Any ideas?

Is This A Good Question/Topic? 0
  • +

Replies To: Font Color in css

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: Font Color in css

Posted 03 October 2017 - 01:55 PM

Basic ID and CSS
https://www.w3school...sref/sel_id.asp

Give that span an ID..

<span id="phone" itemprop="telephone">



#phone 
{ 
    color:green's hex value;
}

Was This Post Helpful? 0
  • +
  • -

#3 JamesBond007123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 03-October 17

Re: Font Color in css

Posted 03 October 2017 - 02:58 PM

thanks! Looks like a winner!!
Was This Post Helpful? 0
  • +
  • -

#4 JamesBond007123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 03-October 17

Re: Font Color in css

Posted 04 October 2017 - 01:46 PM

I did a test. But when I went to view in a iPhone Safari browser the phone number is still Blue????
http://designsbydavi...Untitled-1.html

I must be doing something wrong?
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: Font Color in css

Posted 04 October 2017 - 01:52 PM

I see it red now.

Is it blue as in a clickable link blue? As in your mobile safari is being helpful and making a phone number into a clickable link to automatically make a call.

https://developer.ap.../TP40008193-SW5
Was This Post Helpful? 0
  • +
  • -

#6 JamesBond007123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 03-October 17

Re: Font Color in css

Posted 04 October 2017 - 02:29 PM

Thanks. I just added:

<meta name="format-detection" content="telephone=no">

and the phone number is unclickable and all one color now on a mobile phone.

and it is fine now.

http://designsbydavi...Untitled-1.html

I appreciate everyone's help in this.
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13483
  • View blog
  • Posts: 53,820
  • Joined: 12-June 08

Re: Font Color in css

Posted 04 October 2017 - 02:30 PM

Yes.... every.. ones..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1