CS question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • _Who

    #1

    CS question

    I thought when two things appear together in a css file the rule applies to
    all of them. In the following: h1, h2, h3 and h4 all have a family and
    margin specified.

    h1 h2 h3 h4{

    font-family: Arial, Helvetica, San Serif;

    margin-bottom: 2pt;

    margin-top: 2pt;

    }



    Assuming the above statement is correct the following statements have me
    confused. The entries below had many more entries between them but I select
    ones containing "A.Visited" . It seems to me that each one would redefine
    A.Visited and only the last one would be effective.



    Or does, for example, the first one say: If an element has the ID "menuitem"
    and an "A" tag then A.Visited color is #FFFFFF??

    If that is the case it appears to be in contradiction to what I said above
    about the h's.

    Can you straighten this out?

    Thanks



    #menuitem A:Visited {

    color: #FFFFFF;

    }

    A:Visited {

    color: #003399;

    text-decoration: none;

    }

    ..bottomnav A:visited {

    font-size: 8pt;

    color: #F0E68C;

    }


  • bruce barker

    #2
    Re: CS question

    you have the wrong syntax.

    h1 h2 {....}

    means apply css to a h2 thats a child of a h1. to condense use the
    comma, not the space:

    h1, h2, h3, h4 {....)


    -- bruce (sqlwork.com)


    _Who wrote:
    I thought when two things appear together in a css file the rule applies to
    all of them. In the following: h1, h2, h3 and h4 all have a family and
    margin specified.
    >
    h1 h2 h3 h4{
    >
    font-family: Arial, Helvetica, San Serif;
    >
    margin-bottom: 2pt;
    >
    margin-top: 2pt;
    >
    }
    >
    >
    >
    Assuming the above statement is correct the following statements have me
    confused. The entries below had many more entries between them but I select
    ones containing "A.Visited" . It seems to me that each one would redefine
    A.Visited and only the last one would be effective.
    >
    >
    >
    Or does, for example, the first one say: If an element has the ID "menuitem"
    and an "A" tag then A.Visited color is #FFFFFF??
    >
    If that is the case it appears to be in contradiction to what I said above
    about the h's.
    >
    Can you straighten this out?
    >
    Thanks
    >
    >
    >
    #menuitem A:Visited {
    >
    color: #FFFFFF;
    >
    }
    >
    A:Visited {
    >
    color: #003399;
    >
    text-decoration: none;
    >
    }
    >
    .bottomnav A:visited {
    >
    font-size: 8pt;
    >
    color: #F0E68C;
    >
    }
    >
    >

    Comment

    • _Who

      #3
      Re: CS question

      Thanks, that's what I been missing

      "bruce barker" <nospam@nospam. comwrote in message
      news:uvuJH5gGJH A.2580@TK2MSFTN GP05.phx.gbl...
      you have the wrong syntax.
      >
      h1 h2 {....}
      >
      means apply css to a h2 thats a child of a h1. to condense use the comma,
      not the space:
      >
      h1, h2, h3, h4 {....)
      >
      >
      -- bruce (sqlwork.com)
      >
      >
      _Who wrote:
      >I thought when two things appear together in a css file the rule applies
      >to all of them. In the following: h1, h2, h3 and h4 all have a family and
      >margin specified.
      >>
      >h1 h2 h3 h4{
      >>
      >font-family: Arial, Helvetica, San Serif;
      >>
      >margin-bottom: 2pt;
      >>
      >margin-top: 2pt;
      >>
      >}
      >>
      >>
      >>
      >Assuming the above statement is correct the following statements have me
      >confused. The entries below had many more entries between them but I
      >select ones containing "A.Visited" . It seems to me that each one would
      >redefine A.Visited and only the last one would be effective.
      >>
      >>
      >>
      >Or does, for example, the first one say: If an element has the ID
      >"menuitem" and an "A" tag then A.Visited color is #FFFFFF??
      >>
      >If that is the case it appears to be in contradiction to what I said
      >above about the h's.
      >>
      >Can you straighten this out?
      >>
      >Thanks
      >>
      >>
      >>
      >#menuitem A:Visited {
      >>
      >color: #FFFFFF;
      >>
      >}
      >>
      >A:Visited {
      >>
      >color: #003399;
      >>
      >text-decoration: none;
      >>
      >}
      >>
      >.bottomnav A:visited {
      >>
      >font-size: 8pt;
      >>
      >color: #F0E68C;
      >>
      >}
      >>

      Comment

      Working...