CSS Question

Discussion in 'HTML' started by Brett Baisley, Jan 14, 2004.

  1. Hey
    I am working on a css style for a page. I created something that looks like
    this:

    ..navLink
    {
    font-family: arial; font-size: 10pt; color: black; text-decoration: none;
    }

    that is set for a block of text on the page like this:

    <span class="navLink">
    Home | Pictures | About
    </span>

    What I want to know, is that some of this text will be links to other pages.
    I want to create a style for them so that they look different (ie: different
    color, no underline) then the rest of the text, but I don't want to change
    the rest of the other links on the page. Therefore I can't change a{...} as
    this will change all of the links.

    Is there a way, and if so how, can you write this? Something like

    ..navLink.a
    {
    font-family: arial; font-size: 12pt; color: red; text-decoration: none;
    }

    would be nice.

    Thanks
    Brett Baisley, Jan 14, 2004
    #1
    1. Advertising

  2. Brett Baisley

    brucie Guest

    brucie, Jan 14, 2004
    #2
    1. Advertising

  3. Brett Baisley

    rf Guest

    "Brett Baisley" <> wrote in message
    news:nokNb.63778$...
    > Hey
    > I am working on a css style for a page. I created something that looks

    like
    > this:
    >
    > .navLink
    > {
    > font-family: arial; font-size: 10pt; color: black; text-decoration: none;
    > }
    >
    > that is set for a block of text on the page like this:
    >
    > <span class="navLink">
    > Home | Pictures | About
    > </span>
    >
    > What I want to know, is that some of this text will be links to other

    pages.
    > I want to create a style for them so that they look different (ie:

    different
    > color, no underline) then the rest of the text, but I don't want to change
    > the rest of the other links on the page. Therefore I can't change a{...}

    as
    > this will change all of the links.
    >
    > Is there a way, and if so how, can you write this? Something like
    >
    > .navLink.a
    > {
    > font-family: arial; font-size: 12pt; color: red; text-decoration: none;
    > }


    ..navLink a

    BTW don't specify font-size in points or pixels. This will stop the average
    IE viewer from resizing the text. I like my text to be 16pt, not 12 or
    <shudder> 10 </shudder>

    Better yet, don't specify font-size at all, let it default to whatever the
    viewer has chosen.

    Cheers
    Richard.
    rf, Jan 15, 2004
    #3
  4. rf wrote:
    [snip]
    > BTW don't specify font-size in points or pixels. This will stop the
    > average IE viewer from resizing the text. I like my text to be 16pt,
    > not 12 or <shudder> 10 </shudder>
    >
    > Better yet, don't specify font-size at all, let it default to
    > whatever the viewer has chosen.


    Why do people who prefer larger font sizes use IE?

    There is a vast amount of "px" and "pt" stuff on the web. Lots more is
    published every day. It won't go away just because of what is said here. It
    must be hell for such people, when they could surely easily use a free
    alternatice. (I would have thought that Opera would be a very good choice for
    many people, because of its zoom feature).


    I'll point out that I don't set the font size in my body-rules, and when I
    change font sizes for special purposes I use "%". But I'm not convinced by the
    arguments that caused me to do this.

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Jan 15, 2004
    #4
  5. Brett Baisley

    rf Guest

    "Barry Pearson" <> wrote in message
    news:rOtNb.65$...
    > rf wrote:
    > [snip]
    > > BTW don't specify font-size in points or pixels. This will stop the
    > > average IE viewer from resizing the text. I like my text to be 16pt,
    > > not 12 or <shudder> 10 </shudder>
    > >
    > > Better yet, don't specify font-size at all, let it default to
    > > whatever the viewer has chosen.

    >
    > Why do people who prefer larger font sizes use IE?


    Why to people who prefer larger font sizes use a beige computer? Because
    that is what the computer shop sold them when they said "I want a computer".
    >
    > There is a vast amount of "px" and "pt" stuff on the web.


    Just because "everybody does it" does not make it right.

    > Lots more is
    > published every day.


    Yeah, sad isn't it.

    > It won't go away just because of what is said here.


    Sadly not but if what is said here affects just a few people then that makes
    the web just that little bit better.

    > It
    > must be hell for such people,


    Nope. They (including me) simply switch on their accessibily options and
    ignore *all* of your font size specifications.

    > when they could surely easily use a free
    > alternatice.


    Maybe the don't know how. Anyway, the alternative may not be as free as you
    think. Downloading a 20MB "free" browser can be very expensive on a dial up
    line.

    >
    > I'll point out that I don't set the font size in my body-rules, and when I
    > change font sizes for special purposes I use "%". But I'm not convinced by

    the
    > arguments that caused me to do this.


    Keep reading here, the reasons will become clear eventually.

    Cheers
    Richard.
    rf, Jan 15, 2004
    #5
  6. rf wrote:
    > "Barry Pearson" <> wrote in message
    > news:rOtNb.65$...

    [snip]
    >> Why do people who prefer larger font sizes use IE?

    >
    > Why to people who prefer larger font sizes use a beige computer?
    > Because that is what the computer shop sold them when they said "I
    > want a computer".


    I would expect those people to know better than that. These are not
    mentally-defuddled people. These are mentally-normal people who know far
    better than you or I all the aspects of their disability. If they don't know
    about accessibility aids, and don't bother to ask, frankly they deserve all
    they get.

    >> There is a vast amount of "px" and "pt" stuff on the web.

    >
    > Just because "everybody does it" does not make it right.


    If those people are expected to continue to access published stuff, "right"
    and "wrong" are irelevant. The web is highly "px" oriented, and probably will
    be for a decade. The best thing to do is deal with such a web. Or fume for the
    next decade!

    >> Lots more is published every day.

    >
    > Yeah, sad isn't it.
    >
    >> It won't go away just because of what is said here.

    >
    > Sadly not but if what is said here affects just a few people then
    > that makes the web just that little bit better.


    Or perhaps it just gives a few people the illusion that if they wait long
    enough the tide will turn. When the tide won't turn, and the web continues to
    be as it is, those people should stop waiting and take matters into their own
    hands and equip themselves to handle the world as it really is.

    >> It must be hell for such people,

    >
    > Nope. They (including me) simply switch on their accessibily options
    > and ignore *all* of your font size specifications.


    Then that is what all visually-disabled people should do! Good! That is surely
    the way forward - for visually-disabled people to take control of their own
    destiny. So people can publish "px", and visually disabled people can
    disregard that and sort things out for themselves.

    That makes my point - visually-disabled people should be helped to take
    control, and not rely on authors implementing particular standards. Authors
    should "enable", not "spoon-feed".

    >> when they could surely easily use a free alternative.

    >
    > Maybe the don't know how. Anyway, the alternative may not be as free
    > as you think. Downloading a 20MB "free" browser can be very expensive
    > on a dial up line.


    Gosh! More expensive than my reading glasses? I think not.

    My experience with people with physical disabilities is that they tend to be
    pretty aware both of their problems and the potential solutions. They may need
    some clues, but not a total service. They tend to be highly motivated to solve
    their problems without having to be spoon-fed. In fact, they typically hate to
    be patronised! (I would be interested in feedback on that).

    There are lots of ways that people can obtain an alternative. We should not
    inhibit those ways from developing.

    >> I'll point out that I don't set the font size in my body-rules, and
    >> when I change font sizes for special purposes I use "%". But I'm not
    >> convinced by the arguments that caused me to do this.

    >
    > Keep reading here, the reasons will become clear eventually.


    No. On the contrary! I made my decisions on inadequate analysis. The more I
    read, the more I suspect that it wasn't a good decision.

    I'm no longer convinced that any seriously visually-disabled people still use
    IE. And therefore that there any need to avoid "px" or "pt".

    I would be interested to see alternative analysis.

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Jan 16, 2004
    #6
  7. Brett Baisley

    rf Guest

    "Barry Pearson" <> wrote in message
    news:r0_Nb.373$...
    > rf wrote:
    > > "Barry Pearson" <> wrote in message
    > > news:rOtNb.65$...

    > [snip]



    > > Nope. They (including me) simply switch on their accessibily options
    > > and ignore *all* of your font size specifications.


    > Then that is what all visually-disabled people should do! Good! That is

    surely
    > the way forward - for visually-disabled people to take control of their

    own
    > destiny. So people can publish "px", and visually disabled people can
    > disregard that and sort things out for themselves.


    So, if you know that people are going to ignore your font size suggestions
    then why make such suggestions in the first place?

    > I'm no longer convinced that any seriously visually-disabled people still

    use
    > IE. And therefore that there any need to avoid "px" or "pt".


    The *real* problem is not IE or visually disabled people. The problem is
    authors.

    Authors think they are painting on a peice of paper rather than a web page.
    Everything must fit just so, the image should be here, the text should be
    there and it *must* be a certain font size otherwise it won't fit. All of
    this must fit into a box that is exactly 800 by 600 pixels. These authors
    invariably use IE for testing so pixels is the obvious choice.

    Then they submint their site for review either here or over at
    alt.html.critique or even aww. The first thing that happens is that somebody
    changes the font size (using Mozilla or Opera or even IE with the
    accessibility box checked). Said authors cry out in either dismay or anger
    that their pride and joy is now broken. Often they verbally attack the
    reviewer for "stuffing up their page".

    If IE did not have that bug where font-size in pixels rendered the font size
    unchangable (in an out of the box system) then IMHO nobody would be using
    pixels. We would all be using % or em or some such.

    Cheers
    Richard.
    rf, Jan 16, 2004
    #7
  8. rf wrote:
    > "Barry Pearson" <> wrote in message
    > news:r0_Nb.373$...
    >> rf wrote:
    >> > "Barry Pearson" <> wrote in message
    >> > news:rOtNb.65$...

    >> [snip]

    >
    >> > Nope. They (including me) simply switch on their accessibily
    >> > options and ignore *all* of your font size specifications.

    >
    >> Then that is what all visually-disabled people should do! Good! That
    >> is surely the way forward - for visually-disabled people to take
    >> control of their own destiny. So people can publish "px", and
    >> visually disabled people can disregard that and sort things out for
    >> themselves.

    >
    > So, if you know that people are going to ignore your font size
    > suggestions then why make such suggestions in the first place?


    Read what I said - "... visually disabled people can disregard ...". I didn't
    say everyone!

    That is the point here - I produce web pages that look as I want them to look
    in my test set of browsers with their default settings. So people using those
    browsers and don't change the settings are probably seeing something like what
    I want them to see. Good.

    People who use other browsers, or change the default settings, may see
    something different. Also good. This may mean we are all happy!

    >> I'm no longer convinced that any seriously visually-disabled people
    >> still use IE. And therefore that there any need to avoid "px" or
    >> "pt".

    >
    > The *real* problem is not IE or visually disabled people. The problem
    > is authors.


    You didn't respond to my point, though. Do seriously visually-disabled people
    still use IE? If not, then we don't need to worry about "px" or "pt". And if
    they *do* still use IE - how do they manage? The web is dominated by pages
    using "px" especially, and people are not going to stop tomorrow or next year.
    No one is going to change all those historical but still valuable pages. So
    the answer is for people to use suitable technology. Eg. Opera.

    [snip]
    > If IE did not have that bug where font-size in pixels rendered the
    > font size unchangable (in an out of the box system) then IMHO nobody
    > would be using pixels. We would all be using % or em or some such.


    If IE didn't have that bug, there would less reason to avoid "px"! People want
    to control how their pages look. They always will. By giving authors control
    of what happens by default, while having technology that allows people who
    want otherwise to override the defaults, we have a system where both sides
    win. (When I switched from using "px" to using "%", I used the "%" value that
    made the text look the same size as the original "px" version in my target set
    of browsers).

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Jan 17, 2004
    #8
  9. Brett Baisley

    Steve Pugh Guest

    "Barry Pearson" <> wrote:

    >Do seriously visually-disabled people still use IE?


    Maybe, maybe not. Even IE can be made accessible by setting it to
    ignore all font sizes.

    But the issue is not with _seriously_ visually-disabled people (your
    words, my emphasis).

    People with moderate visual problems might have a larger than normal
    default font size. Em or % based text size will be derived from this.
    If a user has a default text size of 20px rather than the standard
    16px then text sized at 75% is now 16px which may still be legible,
    but text sized at 12px (75% of 16px but only 60% of 20px) is less
    likely to be so.

    People who can normally read all text at size X might come a cross a
    web page with text in a partcular font that they can't read at size X
    and so they want to increase the text size for that one page.

    The quality of people's eyesite is not always static; some people with
    certain medical conditions (e.g. some diabetics) have days when their
    eyesite is worse than normal; and sometimes people are just tired.

    Expecting all those people, none of whom would regard themselves as
    "seriously visually-disabled" to use a different browser or to disable
    all font sizing in IE is not realistic. Avoiding pixel sized text and
    thus allowing them to adjust the text size as and when they need to
    is.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 17, 2004
    #9
  10. Steve Pugh wrote:
    > "Barry Pearson" <> wrote:
    >
    >>Do seriously visually-disabled people still use IE?

    >
    > Maybe, maybe not. Even IE can be made accessible by setting it to
    > ignore all font sizes.
    >
    > But the issue is not with _seriously_ visually-disabled people (your
    > words, my emphasis).


    Fair comment.

    [snip]
    > Expecting all those people, none of whom would regard themselves as
    > "seriously visually-disabled" to use a different browser or to disable
    > all font sizing in IE is not realistic. Avoiding pixel sized text and
    > thus allowing them to adjust the text size as and when they need to
    > is.


    But this *still* doesn't resolve the problem I see. The web is awash with
    millions of pages that are "px" oriented. Perhaps another 100,000 or more are
    published each day. This will continue for years.

    It is irrelevant what I do. (Which is not even to set a default size in the
    body rule, and then only modify using "%" for special purposes, such as
    headers & admin text, etc. I'm probably one of the good guys!)

    I am questioning whether it is simply too late (nearly a decade too late!) to
    tackle this by giving advice on NGs, and perhaps some other places. Those
    people *still* need a different browser, before Longhorn, and nothing will
    change that fact! The fact that you and I am some others here avoid "px" is
    far too little, far too late.

    I keep wondering whether we are simply thinking about this all wrong. Because
    we author HTML & CSS, it is tempting for us to think that is where the
    solution lies. But perhaps the solution is for all opticians to hand out CDs
    with accessibility software & better browsers, or at least hand out leaflets.
    Or some other non-authoring solution. How else will all affected people be
    able to read the vast amounts of stuff already committed to "px"?

    And ensure that all organisations allowing/requiring people to use browsers on
    their computers (companies, libraries, etc) all supply such browsers as
    standard. This would also have the effect of sending a useful message to Mr
    Gates.

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Jan 17, 2004
    #10
  11. Brett Baisley

    Steve Pugh Guest

    "Barry Pearson" <> wrote:

    >But this *still* doesn't resolve the problem I see. The web is awash with
    >millions of pages that are "px" oriented. Perhaps another 100,000 or more are
    >published each day. This will continue for years.
    >
    >It is irrelevant what I do. (Which is not even to set a default size in the
    >body rule, and then only modify using "%" for special purposes, such as
    >headers & admin text, etc. I'm probably one of the good guys!)


    So your site is automatically more accessible than all those thousands
    of others. That is good for your business.

    You said earlier in this thread that you were considering switching
    back to pixels having decided that the case for flexible font sizing
    wasn't as convincing as you once thought, I hope that we can sway you
    back to side of good.

    >I am questioning whether it is simply too late (nearly a decade too late!) to
    >tackle this by giving advice on NGs, and perhaps some other places.


    Sturgeon's Law. "90% of everything is crap".

    OTOH, every single web site that is made flexible and accessible as a
    result of all this ranting on usenet is a tiny step towards making the
    web a better place as a whole. Yes, this needs to be combined with
    better browsers; stricter laws, were appropriate; and better education
    of the surfing public on how to use the tools they already have; but
    no one thing alone can have a significant impact on the problem, only
    all these things in concert.

    >Those
    >people *still* need a different browser, before Longhorn, and nothing will
    >change that fact!


    Different browser or different web site. There are very few sites that
    are the one and only source for any given subject.

    And many people probably just squint. Being an optician in the five,
    ten years time when all this catches up with people could be
    lucrative.

    >The fact that you and I am some others here avoid "px" is
    >far too little, far too late.


    No, it gives us an advantage. Our sites are more accessible and more
    usable; and our skills in developing accessible, flexible web sites
    are easily demonstrated to potental clients (including all those nice
    lucrative government contracts where accessibility is a must).

    >But perhaps the solution is for all opticians to hand out CDs
    >with accessibility software & better browsers, or at least hand out leaflets.


    No, we (unless we are profit-hungry opticians) want to solve the
    problem now before people's eyesite is damaged by squinting for too
    long. Look at the examples I gave in my earlier post, many of those
    people don't need to see an optician.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 17, 2004
    #11
  12. Steve Pugh wrote:
    > "Barry Pearson" <> wrote:
    >>

    [snip]
    > You said earlier in this thread that you were considering switching
    > back to pixels having decided that the case for flexible font sizing
    > wasn't as convincing as you once thought, I hope that we can sway you
    > back to side of good.


    I'm not considering switching back. I'm questioning whether the effort I put
    in was worth it. Because of the arguments I have put forward here, I am only
    glad it didn't cost me much effort. I am not seeing convincing arguments here.

    [snip]
    > OTOH, every single web site that is made flexible and accessible as a
    > result of all this ranting on usenet is a tiny step towards making the
    > web a better place as a whole. Yes, this needs to be combined with
    > better browsers; stricter laws, were appropriate; and better education
    > of the surfing public on how to use the tools they already have; but
    > no one thing alone can have a significant impact on the problem, only
    > all these things in concert.


    The orders of magnitude are wrong. "Tiny" is the operative word! It appears to
    be at the head-banging level.

    [snip]
    >>But perhaps the solution is for all opticians to hand out CDs
    >>with accessibility software & better browsers, or at least hand out
    >>leaflets.

    >
    > No, we (unless we are profit-hungry opticians) want to solve the
    > problem now before people's eyesite is damaged by squinting for too
    > long. Look at the examples I gave in my earlier post, many of those
    > people don't need to see an optician.


    Fair comment. But what we can achieve is still at the "irrelevant" level. We
    *can't* solve the problem in this way, and probably not even 1% of it. Much of
    the damage has already been done, over several years. The pages are out there.

    In a different subject area, I have seen people waste lots of time in NGs etc
    hoping that they were making a difference. They weren't. It would have been
    better for those people to divert that effort to lobbying, giving evidence to
    committees, appearing on radio & TV, etc.

    I wonder if those actions could cause organisations to switch en masse from IE
    and send that message to Mr Gates? I wonder how easily he could fix a few
    things in IE if he felt threatened?

    Just some thoughts. I'm not changing back, because what I do suits me just as
    much. I just have this nagging feeling that we are fooling ourselves.

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Jan 17, 2004
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    713
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    464
    Jukka K. Korpela
    Sep 9, 2003
  3. Replies:
    6
    Views:
    549
    Jonathan N. Little
    Mar 18, 2006
  4. AF
    Replies:
    17
    Views:
    599
    Nije Nego
    Aug 9, 2006
  5. richard
    Replies:
    12
    Views:
    753
    dorayme
    Mar 9, 2010
Loading...

Share This Page