# why won't colors change in table?



## bj nick (Jun 10, 1999)

I have a table on a page with text in yellow. For some reason, I cannot seem to change the color. I do the usual font/color, etc, but it will not change color, even though I can see it being selected. It just doesn't change. Can someone look at this code and see if there's anything weird here?

Note: I didn't do the code; I did it wysiwyg, but this code is what was generated....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Untitled 2

Trails in the Eastern Sierra





The Buttermilk Country


----------



## bj nick (Jun 10, 1999)

Addendum.....much of the text is underlined as well, and I did not specify this, nor can I seem to get rid of the underlining....what am I doing wrong here as far as formatting, that I'm getting these issues? Something basic that I'm missing?


----------



## Hughv (Jul 22, 2006)

See here for how to insert and format a style sheet:
http://www.w3schools.com/css/css_howto.asp


----------



## bj nick (Jun 10, 1999)

Hugh, thanks for your reply. I am so sorry, but it is just Greek to me. I have no clue as to how to create a style sheet using HTML. None. HTML is like algebra to me, and I was always terrible at algebra. By that I mean it is a mass of careful detail and symbols and if you screw up one of them, one little mark, then you are out to sea. I wouldn't have a clue what to do here. Sorry if I sound like a wimp. I just wish there were still a frickin' consumer-level program like Front Page where I could put a simple $%#! table in there without it turning into format hell.


----------



## Hughv (Jul 22, 2006)

It's not as hard as it looks, and you'll need to master the basics if you're going to proceed.
An internal style sheet looks like this:

You need to use the style sheet to define your tags, and the Try It editor is worth a few minutes of your time.
Start here for text color, and all will become clear in a few minutes:
http://www.w3schools.com/css/css_text.asp
Take your time and it will pay off.


----------



## Hughv (Jul 22, 2006)

I've cleaned it up a bit, but you've still got work to do:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Untitled 2

Trails in the Eastern Sierra





The Buttermilk Country


----------



## brandmantra (Dec 1, 2008)

informative posting.


----------



## Eriksrocks (Aug 7, 2005)

Hughv said:


> I've cleaned it up a bit, but you've still got work to do:


How is that cleaning it up? There's no reason to put every class declaration in a different <style> tag. 

*@ bj nick *
More CSS problems I see. What's happening here is that every time you change the font format in Dreamweaver, it creates a new class for that little bit of text.  That's why you're ending up with things like ".style24 { etc... }". I'm guessing that Dreamweaver is trying to apply multiple styles to the bit of text you are selecting, and one style is taking control over the over, and Dreamweaver's probably freaking out. 

What you need to do is go through and clean out the classes (those ".style# { ... }" parts) that you're not using and hopefully Dreamweaver can sort it out by itself. If not, I would suggest creating different classes for each of your colors and sizes. You can also set a "default" color using the body tag CSS. See this example that I typed up:

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
[COLOR="Black"]<style type="text/css">
<!--
[COLOR="Red"]body[/COLOR] {
	color: #000099;
}
[COLOR="Red"].red[/COLOR] {
	color: #FF3333;
}
[COLOR="Red"].big[/COLOR] {
	font-size: 24px;
}
-->
</style>[/COLOR]
</head>

<body>
The default text color is dark blue because of the "body { ... }" CSS.<br />
This is [COLOR="Black"]<span [COLOR="Red"]class="red"[/COLOR]>red text - normal sized.</span>[/COLOR]<br />
This is [COLOR="Black"]<span [COLOR="Red"]class="big"[/COLOR]>big sized</span>[/COLOR] text.<br />
This is [COLOR="Black"]<span [COLOR="Red"]class="big red"[/COLOR]>big red</span>[/COLOR] text!
</body>
</html>
```
That example basically shows the gist of using CSS.  Unfortunately Dreamweaver just doesn't handle changing colors and fonts and such to bits of text very nicely. It wants to create a seperate CSS class for each change you make, thinking that you'll use that class in the future for the rest of you're text, and that makes things *really* messy if you don't know what it's doing.

Hopefully that helped you out a bit, sorry if I didn't explain it enough.


----------



## Hughv (Jul 22, 2006)

I was just trying to work with what the OP had, so he could see the problems.
"Cleaning it up" means I made it work. I think the OP needs to do some serious research, but he seems to have disappeared, and we seem to be wasting our time.


----------



## bj nick (Jun 10, 1999)

The 0P is here, but he is very confused and in way over his head...


----------



## Hughv (Jul 22, 2006)

This is a simple problem if you break it down.
Instead of being the solution, Dreamweaver is the problem. It gives you the impression that creating a web page is simple, but, in fact, it prevents you from learning the underlying principles. It's a lot like using a calculator in math class before you learn long division.
Spend a couple of hours with a tutorial like this one:
http://www.mcli.dist.maricopa.edu/tut/
Spend some more time with the CSS references above, and things will become clearer.
There's no substitute for the basics, and it's actually kind of fun to see things come together as you progress.


----------



## Eriksrocks (Aug 7, 2005)

bj nick said:


> The 0P is here, but he is very confused and in way over his head...


I don't really know how to explain it any better without actually doing everything *for* you... 



Hughv said:


> Instead of being the solution, Dreamweaver is the problem. It gives you the impression that creating a web page is simple, but, in fact, it prevents you from learning the underlying principles. It's a lot like using a calculator in math class before you learn long division.


Agree.


----------



## bj nick (Jun 10, 1999)

I would guess that the reality is that I'm probably not ready to use this program. It would probably take a real time commitment to master the CSS and HTML you're suggesting I learn. 

I had a basic misapprehension about DW. It is/was billed as a program that can function as a wysiwyg application but that you can take it as far as your knowledge will allow- at least that's what I've been told, even by local instructiors. I was hoping I'd be getting a higher-level FrontPage, which I used for years. I'm well aware of its drawbacks, but it was an intuitive consumer-level app that allowed me to create web sites that were halfway decent and worked. It was ultimately an unreliable program but it was very intuitive. Dreamweaver is not at all intuitive. It is massively frustrating for me that there seems to be no single basic consumer-level web app that will let me just set up web sites like I used to.

I believe that the things I'm asking of the program are so basic that I don't know why it has to be so difficult. I want to have pages formatted with simple tables, links here and there, that's it. Nothing fancy: just text and images. 

I didn't realize that I would need to develop the higher skillset. I have no background at all in any of it; it may seem like basic stuff to some/most of you, but it's very complicated and frustrating for me and disheartens me in trying to master it. If I was 25 and had lots of free time that would be one thing, but I have many things in the fire and it's just overwhelming trying to understand the technical stuff. Sorry to sound like a big whiner.

I will try to look over the CSS guidelines and tutorials once I have a chance and some time to devote to it. I've put a lot of work and time into starting a web site but I guess it'll have to go on the shelf for now. Thanks for all the feedback.


----------



## tomdkat (May 6, 2006)

Take your time in learning CSS since it can have quite the learning curve but once you learn it, web page design can get easier. 

Here is the code in question:


```
<span class="style26">[b][color=red]<a href="buttermilk-country.html">The Buttermilk Country </a>[/color][/b]</span>
```
The "style26" styling won't apply to the link text because of the nature of the anchor elment (i.e. the <a> tag). Since anchors have different colors for the state of the link (active vs visited, and so on), those colors will override the styling of the the parent span element. That possibly in conjunction with the anchor being a "block level" element while the span element is an "inline" element.

So, the short answer is to change your CSS styling like this:


```
.style26 a {font-size: 18px; color: #00FF40; }
```
Add the above to your stylesheet (your original style sheet was formatted just fine as Eriksrocks indicated) and the color of the link should change.

At least it did for me. 

Peace...


----------



## JimmySeal (Sep 25, 2007)

I haven't used Dreamweaver myself, but I am sure you can get quite far with it without diving all the way into the world of HTML and CSS. As tomdkat pointed out, the problem is that links are formatted differently from regular text. I recommend you explore the Dreamweaver options and see if there is a way to specify link styling, so you can resolve this issue again in the future.


----------



## colinsp (Sep 5, 2007)

In DW without CSS styling the link styling is performed in 'Page Properties' this allows you to chose colours, underlined, fonts etc.


----------



## JimmySeal (Sep 25, 2007)

This is a bit more than what you're trying to do, but this might give you the general idea on how to style links for just a part of the page:

http://www.layersmagazine.com/dreamweaver-navigation-bar-css.html


----------



## bid2me (Jan 3, 2009)

Expressions Web is WAY better then Dreamweaver.


----------



## Eriksrocks (Aug 7, 2005)

bid2me said:


> Expressions Web is WAY better then Dreamweaver.


You're joking, right?


----------



## echicken (Dec 30, 2008)

Hughv said:


> This is a simple problem if you break it down.
> Instead of being the solution, Dreamweaver is the problem. It gives you the impression that creating a web page is simple, but, in fact, it prevents you from learning the underlying principles. It's a lot like using a calculator in math class before you learn long division.
> Spend a couple of hours with a tutorial like this one:
> http://www.mcli.dist.maricopa.edu/tut/
> ...


I totally agree.
But Dreamweaver is a great help with those code hints


----------



## bid2me (Jan 3, 2009)

Expressions Web 2 does great code hints.


----------



## xtiano77 (Nov 28, 2008)

I think adding this line to your style sheet will do the trick.

table td a:link{color: #FFFF00; font-family: Arial, Helvetica, sans-serif;}

I hope you don't mind, but I cleaned up your code a little bit, and I think the version below will do exactly what you are trying to do. If you are having problems with your CSS, you might want to check out the Wrox Bginning CSS, ISBN: 978-0-470-09697-0. You can pick it up at Amazon for a good price. CSS is not hard, it just takes practice. In my case, I bought that book and as I read it, I created a quick reference document with the code, explanation and short examples. It works pretty good when you combine it with some JavaScript. Combining those two will make your pages look very nice without too much code. The http://www.w3schools.com/ also has some nice examples and brief explanations on CSS code.

My version of your code:

Untitled 2

Trails in the Eastern Sierra



The Buttermilk Country 

I think you should try an external style sheet. You can write all the CSS code you want and keep it on an independent document and all you have to do is all the following line to your html documents.

Hope this helps.


----------

