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.
I'm so sorry I am very new to this and basically learning everything from a book. Is there any way you can give me an actual example... say i wanted to do the color 07c3d2 on the word hydrocarbons.
Is this what you mean
CSS- Type this on css code page anywhere..?
.important {07c3d2: blue; }
HTML- type this in html. Where do i put the word hydrocarbons. I know if i double click the word it will take me directly to the code, but not sure how to write this.
<p>This is an <span class="important">important</span> point.</p>
Please help. Im sorry. I'm literally just learning all this stuff.
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.
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 is that what you need or something else? Thank again
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?
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?
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.
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....
North America
Europe, Middle East and Africa
Asia Pacific