SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    why doesn't this "class" work?

    Code:
    .text_gray { color:#cccccc }
    The above code is nested in <style>.

    And the below code is in main body.
    Code:
    <span class="text_gray"> 2004-08-25 </span>
    I am expecting the color of the text "2004-08-25" is gray, but it actually is default color "black."

    Why doesn't this "class" work?

    If you visit at http://220.89.242.19:8500/test/003/home/index.cfm ,
    you will understand more clearly about it.

    Thanks in Advance

  2. #2
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles, CA
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    might it be the underscore ... perhaps try a hyphen?

  3. #3
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe span.text_gray { color:#cccccc } ? And, yeah, try removing the underscore too.

  4. #4
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by earther
    Maybe span.text_gray { color:#cccccc } ? And, yeah, try removing the underscore too.
    I changed "text_gray" into "textGray" in both <style> and <body>.

    But it(2004-08-25) is still black, not gray at http://220.89.242.19:8500/test/004/home/index.cfm .

  5. #5
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Perth, Western Australia
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by joon
    I changed "text_gray" into "textGray" in both <style> and <body>.

    But it(2004-08-25) is still black, not gray at http://220.89.242.19:8500/test/004/home/index.cfm .
    I couldn't access that url, no doubt because of the non-standard port and I'm behind a firewall. So unfortunately I can't look at the problem in context with the page.

    But generally I have found that when a style is not displaying as expected there is an issue with the cascade. You'll need to check that there is no other style that is being inherited in that particular instance - and overriding your .textGray class.

    Do you have Dreamweaver MX 2004? That has a built-in feature that lets you know all the other styles affecting a particular element. (In the Tag palette under the Relevant CSS tab.)

    mate. :-)

  6. #6
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mate
    Do you have Dreamweaver MX 2004?
    Yes, I have it(DW MX 2004).

    Quote Originally Posted by mate
    In the Tag palette under the Relevant CSS tab.
    Where is the Relevant CSS tab?

  7. #7
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Perth, Western Australia
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by joon
    Where is the Relevant CSS tab?
    If you can't see the Tags palette then go to Window > Tag Inspector and make sure it is checked - if not, check it - and you will see it with your palettes on the right. Expand that (Tags) palette and you will see a tab called Relevant CSS.

    In your document, in Design view (I work in Split view so I have access to both Design and Code views at any given moment) click on (select) the element/tag you want to inspect. Then look at the Tags palette under the Relevant CSS tab and see if you can work out what's happening.

    mate. :-)

  8. #8
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I solved this problem by removing the space remove after the dot.

    Thank you to all

  9. #9
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL!! After all that, it's a typo!!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •