When I select a style from the properties inspector for text, it applies the font-family and font-size, but not the color.

I cant figure out why.

When I look at it in dreamweaver it works, but when I look at the page in a browser, it doesn't work.

Does anyone have any ideas? It seems like certain styles are being over ridden by other css rules.

Dani AI

Generated

The behavior reported by — Dreamweaver showing the color in design view but browsers not — usually comes down to the live cascade, selector specificity, or a simple syntax/targeting mismatch. 's point about rule order and 's tip about the color value are both useful; the following checklist gives a short, practical debugging flow and safe quick tests.

  1. Use the browser developer tools (Inspect/Computed Styles) to see which rule is actually setting the color and which stylesheet/line it comes from. This immediately shows whether a later or more specific rule is winning (see Cascade and inheritance and Specificity).
  2. Confirm the selector matches the markup actually rendered (classes vs IDs vs element selectors) and whether the text is inside an a tag or another element with its own color/pseudo-class rule.
  3. Check stylesheet load order and caching: a stylesheet loaded after the intended one can override it, and cached CSS can hide recent changes.
  4. Verify color syntax (hex needs #, or use rgb()/named colors) — malformed values are ignored (see color).
  5. Temporarily test with an inline style or a forced override to confirm it's an override issue:
.test { color: #c00 !important; }

Use !important only for testing. Once the winning rule is identified, fix it by increasing selector specificity, placing the rule later in the cascade, or adjusting the markup. Dreamweaver’s design view can differ from the browser; always verify with the browser’s inspector and the page source.

Recommended Answers

All 2 Replies

When styles conflict, styles lower in the stylesheet are given priority over styles above them.

why dont u post the style code here so i can help :).
what comes in my mind cud be that ur missing a # sign before teh color code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.