Skip to main content
Participating Frequently
April 3, 2017
Question

Display on web site not matching design window

  • April 3, 2017
  • 2 replies
  • 398 views

Hi

I have this code on a page to add a background to some text:

<p>Follow the sign to

      

         <span>XM496</span>

       

       (Britannia) as indicated.

        </p>

which is controlled by

span {

    color: #FFF;

    background-color: #600;

}

In my design window it shows up perfectly but in a browser it does not.

The web site is

http://www.xm496.com

would appreciate some help on what I’ve missed

thanks

Ian

    This topic has been closed for replies.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    April 3, 2017

    Using ordinary <span> tags is not efficient or meaningful.  Span carries no semantic weight, it's an inline element.  It's most often used when you need a quick style change mid-sentence.  But it's not a replacement for HTML 5 tags <div> <section> <header> <footer> <nav> <p> <h1> <h2> etc...

    An example of when to use the <span> tag:

    <p>This is a default paragraph style with a <span class="red">red class</span> inside.</p>

    Please review HTML5 semantic tags for more info.

    HTML5 Semantic Elements

    Nancy

    Nancy O'Shea— Product User & Community Expert
    BenPleysier
    Community Expert
    Community Expert
    April 3, 2017

    Nowhere in your online CSS documents do I come across background-color: #600;.

    Where did you place it?

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    jen0dorfAuthor
    Participating Frequently
    April 3, 2017

    Hi

    Mmmm perhaps thats the issue? I checked and it is there and it's being called

    <link href="p7affinity/p7affinity_05.css" rel="stylesheet" type="text/css" />

    it's in

    /htdocs/p7affinity/p7affinity_05.css

    thanks

    Ian

    Jon Fritz
    Community Expert
    Community Expert
    April 3, 2017

    Change the following...

    span {

    color: #FFF;

    background-color: #600;

    }

    to

    .content p span {

    color: #FFF;

    background-color: #600;

    }