Skip navigation
hj18345
Currently Being Moderated

change the font color of one word in a paragraph

Mar 7, 2013 2:47 PM

I would like to change the font color of one word within a paragraph. I have tried making a class and seems to work in design and live view, but when I preview it doesn't not show up. I am real beginner at this so if you have resolution please be as descriptive as possible.

 
Replies
  • Currently Being Moderated
    Mar 7, 2013 2:51 PM   in reply to hj18345

    CSS

     

    .important { color: red; }

     

     

    HTML

     

    <p>This is an <span class="important">important</span> point.</p>

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2013 2:55 PM   in reply to hj18345

    If the color is purely for emphasis, use an em tag.

     

    em {color:red}

     

    <p>This is an <em>emphasized</em>point.</p>

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2013 4:36 PM   in reply to hj18345

    Yes, if you want to do it via the DW interface.

     

    It's often quicker and easier to just type the code by hand in Code View.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 11:42 AM   in reply to hj18345

     

    CSS- Type this on css code page anywhere..?

    .important {07c3d2: blue; }

    Close but not quite. As written, that does not mean anything.

     

    Helps if you understand the very basics of a CSS rule:

     

    .important is a selector (in this case a class name)

     

    The CSS rule consists of <attribute>: <value>

     

    In your case, the attribute is the font color (the attribute name is simply "color" in CSS) and the value is #07c3d2. (The # is crucial. Without it the 6 digit Hex color value is ignored).

     

    So, putting it all together

     

    .important { color: #07c3d2; }

     

    That's the CSS rule. Still does nothing until it's applied to the HTML.

     

     

    In the HTML,

     

    <p>This is an <span class="important">hydrocarbons</span> point.</p>

     

     

    If you need more, please point us to an actual example of a page which you're working on.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 11:55 AM   in reply to hj18345

    Your markup on that page contains this -

     

    <p class="ad_copy"><strong>Now Offering:</strong> Analysis of Hydrogen, Carbon Monoxide and Total Hydrocarbon's within AMMONIA.</p>

     

    Note that there is no <span class="important"> wrapping that word. And by the way, the proper word there would NOT have the apostrophe. It should be "Hydrocarbons" as a simple plural (also in the following paragraph).

     

    Did you upload the modified page?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 11:57 AM   in reply to hj18345

    Oh, and by the way, I have to say that you have chosen a VERY VERY poor method for creating this page. Your use of absolute positioned elements as a page layout tool is going to be a catastrophe for you.

     

    If you want to adapt to a more proper method please read this page -

     

    http://www.apptools.com/examples/pagelayout101.php

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 12:06 PM   in reply to hj18345

    So I did and it worked in the design and live mode, but when I previewed in the browser nothing changed? Do i have a coding error somewhere? Here is the link http://www.peaklaboratories.com/products/index_remodel.html

    I see <span class="important"> in the HTML (so you've uploaded the HTML page) but I do not see the .important rule in the CSS (so you have not uploaded the CSS file).

     

    Have you uploaded the edited CSS sheet which includes the new .important rule?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 2:13 PM   in reply to hj18345

    In two places, that page has "Hydrocarbon's", and the apostrophe is not grammatically correct. Those are simple plurals, not possessives.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 2:13 PM   in reply to hj18345

    Should be "Hydrocarbons" (plural)  not  "Hydrocarbon's" (possessive).

     

    N

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 2:16 PM   in reply to hj18345

    hj18345 wrote:

     

    I typed it into the css code and saved it. How would i upload it ? doesnt it automatically do that when i save?

     

    No, your files need to be uploaded after every save unless you change a setting in your preferences. I recommend against doing that though as it can cause more ploblems than it solves for new users.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 2:31 PM   in reply to hj18345

    To upload without using the "Upload on Save" function, you can connect to the server by clicking the Connect icon (little electrical plugs) in the Files window, highlight the file then click the Put icon (up arrow)

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 3:03 PM   in reply to hj18345

    hj18345 wrote:

     

    That's how I have it

     

    Sent from my iPhone

     

    That's very very dangerous, especially when you are not so experienced. I don't recommend that you use that option.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 3:15 PM   in reply to hj18345

    If you save a file with the wrong filename (for example, you open a file with nameA) intending to make some changes to it and then save it as nameB, but you forget to do a save as, instead just doing a save, then as soon as you save it both your local and your remote copy of fileA has been changed. Thus - you have just lost fileA. I've been using DW since DW2, and still would not dream of ever using that option....

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2013 3:53 PM   in reply to hj18345

    didn't realize how complicated changing one color could be.

    It's not really. We solved that many posts ago. The thread has morphed.

     

    We're now walking you through the basics of file uploads for Dreamweaver novices. There's plenty of info and tutorials online about it.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 10, 2013 5:05 PM   in reply to John Waller

    thanks,  was looking for an answer to this too

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points