CSS override trouble

Discussion in 'HTML' started by Andreas Paasch, Jul 10, 2003.

  1. I working on a page here with PHP, but I ran into a weird thing that I just
    can't figure out.
    My main CSS files says links should be green.
    So for a page I just override it locally and change link color to red.
    Works fine, except for the last link, that is green and not red.
    I see no error in my HTML - posted below.
    I would really appreciate any hints to what could be wrong here.

    HTML extract:
    [Code snippet]
    <link rel="stylesheet" type="text/css" href="esperia.css">
    <style type="text/css">
    A:link {font : normal normal "Times New Roman" , serif ; color : #FF0033 ;
    text-align : justify }
    </style>

    Du har bestilt:<br>
    Nr. 1, Pizza, Vienetta - <font style="color : #000000">STOR</font> med
    <a href="toppingremove.php?product=S1&top=tomat">tomat</a>
    , <a href="toppingremove.php?product=S1&top=ost">ost</a>
    , <a href="toppingremove.php?product=S1&top=skinke">skinke</a>
    , <a href="toppingremove.php?product=S1&top=rejer">rejer</a>
    til kr. 83.00,-<br>
    [/Code snippet]

    Tomat, ost, skinke is nicely shown in red, but rejer for some reason only in
    green.

    [CSS snippet]
    A:link { font-size : 14pt ; color : #33cc66 ; font-weight : normal ;
    text-decoration : underline ; background-color : #FFFFCC}
    [/CSS snippet]

    I really see nothing wrong here ....

    Thanks for any input.

    /Andreas

    --
    Registeret Linux user #292411
    Andreas Paasch, Jul 10, 2003
    #1
    1. Advertising

  2. Andreas Paasch

    Steve Pugh Guest

    Andreas Paasch <> wrote:
    >Steve Pugh wrote:
    >> Andreas Paasch <> wrote:
    >>
    >>>My main CSS files says links should be green.
    >>>So for a page I just override it locally and change link color to red.
    >>>Works fine, except for the last link, that is green and not red.
    >>>
    >>><link rel="stylesheet" type="text/css" href="esperia.css">
    >>><style type="text/css">
    >>>A:link {font : normal normal "Times New Roman" , serif ; color : #FF0033
    >>>; text-align : justify }

    >>
    >> Always set a background colour when you set a foreground colour.
    >>

    >Background color is set in the css.file. As far as I understand, I can
    >locally override CSS settings, but I only need to set those locally, that
    >actually are changed, thus no background color set here on this page.


    What if your CSS file isn't downloaded?
    Always, always, always set foreground and background colours together.

    >>>Nr. 1, Pizza, Vienetta - <font style="color : #000000">STOR</font> med

    >>
    >> If you're using CSS what is that <font> doing there?
    >>

    >Font is used here to emphasize that we talk about a deviation.


    Emphasize? Deviation? Sounds like a case for <em> or <strong>. Or
    maybe something's been lost in the translation.

    >>><a href="toppingremove.php?product=S1&top=tomat">tomat</a>
    >>>, <a href="toppingremove.php?product=S1&top=ost">ost</a>
    >>>, <a href="toppingremove.php?product=S1&top=skinke">skinke</a>
    >>>, <a href="toppingremove.php?product=S1&top=rejer">rejer</a>

    >>
    >>>Tomat, ost, skinke is nicely shown in red, but rejer for some reason only
    >>>in green.

    >>
    >> You've only set :link.
    >> If that last link is visited then it will use whatever colour is set
    >> for :visited in your css.

    >
    >I see your point here, but the problem is before the link is even touched.


    You've cleared the history and checked?

    Make a test page and post a URL.

    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, Jul 10, 2003
    #2
    1. Advertising

  3. Steve Pugh wrote:

    > Andreas Paasch <> wrote:
    >>Steve Pugh wrote:
    >>> Andreas Paasch <> wrote:
    >>>
    >>>>My main CSS files says links should be green.
    >>>>So for a page I just override it locally and change link color to red.
    >>>>Works fine, except for the last link, that is green and not red.
    >>>>
    >>>><link rel="stylesheet" type="text/css" href="esperia.css">
    >>>><style type="text/css">
    >>>>A:link {font : normal normal "Times New Roman" , serif ; color :
    >>>>#FF0033 ; text-align : justify }
    >>>
    >>> Always set a background colour when you set a foreground colour.
    >>>

    >>Background color is set in the css.file. As far as I understand, I can
    >>locally override CSS settings, but I only need to set those locally, that
    >>actually are changed, thus no background color set here on this page.

    >
    > What if your CSS file isn't downloaded?
    > Always, always, always set foreground and background colours together.


    My CSS file is downloaded and executed, for sure. I have all other settings
    according to it.

    >
    >>>>Nr. 1, Pizza, Vienetta - <font style="color : #000000">STOR</font> med
    >>>
    >>> If you're using CSS what is that <font> doing there?
    >>>

    >>Font is used here to emphasize that we talk about a deviation.

    >
    > Emphasize? Deviation? Sounds like a case for <em> or <strong>. Or
    > maybe something's been lost in the translation.
    >


    Yes, that may be a solution. Again, this word "STOR" needs to be seperated
    and be and eye-catcher, so to speak.
    Products exist in normal and family size, stor just means big aka. family
    size.

    >>>><a href="toppingremove.php?product=S1&top=tomat">tomat</a>
    >>>>, <a href="toppingremove.php?product=S1&top=ost">ost</a>
    >>>>, <a href="toppingremove.php?product=S1&top=skinke">skinke</a>
    >>>>, <a href="toppingremove.php?product=S1&top=rejer">rejer</a>
    >>>
    >>>>Tomat, ost, skinke is nicely shown in red, but rejer for some reason
    >>>>only in green.
    >>>
    >>> You've only set :link.
    >>> If that last link is visited then it will use whatever colour is set
    >>> for :visited in your css.

    >>
    >>I see your point here, but the problem is before the link is even touched.

    >
    > You've cleared the history and checked?


    I have several selected items, behaviour is the same. It's not just this one
    item that has been posted here, but several others too that haven't been
    checked before. Same story.

    >
    > Make a test page and post a URL.
    >


    URL: http://www.traders.dk/test-scripts/toppings.php.html

    This page is just the source code of my problem page. CSS file added as is.
    Funny thing is now, that the testpage works flawlessly.
    I'm stumbled here ....

    /Andreas


    --
    Registeret Linux user #292411
    Andreas Paasch, Jul 10, 2003
    #3
  4. Andreas Paasch

    PeterMcC Guest

    Andreas Paasch wrote:
    > Steve Pugh wrote:
    >
    >> Andreas Paasch <> wrote:
    >>> Steve Pugh wrote:
    >>>> Andreas Paasch <> wrote:
    >>>>
    >>>>> My main CSS files says links should be green.
    >>>>> So for a page I just override it locally and change link color to
    >>>>> red. Works fine, except for the last link, that is green and not
    >>>>> red.
    >>>>>
    >>>>> <link rel="stylesheet" type="text/css" href="esperia.css">
    >>>>> <style type="text/css">
    >>>>> A:link {font : normal normal "Times New Roman" , serif ; color :
    >>>>> #FF0033 ; text-align : justify }
    >>>>
    >>>> Always set a background colour when you set a foreground colour.
    >>>>
    >>> Background color is set in the css.file. As far as I understand, I
    >>> can locally override CSS settings, but I only need to set those
    >>> locally, that actually are changed, thus no background color set
    >>> here on this page.

    >>
    >> What if your CSS file isn't downloaded?
    >> Always, always, always set foreground and background colours
    >> together.

    >
    > My CSS file is downloaded and executed, for sure. I have all other
    > settings according to it.
    >
    >>
    >>>>> Nr. 1, Pizza, Vienetta - <font style="color :
    >>>>> #000000">STOR</font> med
    >>>>
    >>>> If you're using CSS what is that <font> doing there?
    >>>>
    >>> Font is used here to emphasize that we talk about a deviation.

    >>
    >> Emphasize? Deviation? Sounds like a case for <em> or <strong>. Or
    >> maybe something's been lost in the translation.
    >>

    >
    > Yes, that may be a solution. Again, this word "STOR" needs to be
    > seperated and be and eye-catcher, so to speak.
    > Products exist in normal and family size, stor just means big aka.
    > family size.
    >
    >>>>> <a href="toppingremove.php?product=S1&top=tomat">tomat</a>
    >>>>> , <a href="toppingremove.php?product=S1&top=ost">ost</a>
    >>>>> , <a href="toppingremove.php?product=S1&top=skinke">skinke</a>
    >>>>> , <a href="toppingremove.php?product=S1&top=rejer">rejer</a>
    >>>>
    >>>>> Tomat, ost, skinke is nicely shown in red, but rejer for some
    >>>>> reason only in green.
    >>>>
    >>>> You've only set :link.
    >>>> If that last link is visited then it will use whatever colour is
    >>>> set for :visited in your css.
    >>>
    >>> I see your point here, but the problem is before the link is even
    >>> touched.

    >>
    >> You've cleared the history and checked?

    >
    > I have several selected items, behaviour is the same. It's not just
    > this one item that has been posted here, but several others too that
    > haven't been checked before. Same story.
    >
    >>
    >> Make a test page and post a URL.
    >>

    >
    > URL: http://www.traders.dk/test-scripts/toppings.php.html
    >
    > This page is just the source code of my problem page. CSS file added
    > as is. Funny thing is now, that the testpage works flawlessly.
    > I'm stumbled here ....
    >

    I imagine that this confirms that Steve was right in his implication that
    the local link was "visited" in your history - viewing it in a different
    location would mean that the history file had no record of the link

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
    PeterMcC, Jul 10, 2003
    #4
    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. Jibba Jabba

    Can't override CSS class!!!

    Jibba Jabba, Feb 14, 2004, in forum: HTML
    Replies:
    11
    Views:
    37,002
    brandondrury
    Sep 30, 2007
  2. Woodmon
    Replies:
    20
    Views:
    16,719
    Toby Inkster
    Oct 22, 2005
  3. Nocturnal
    Replies:
    3
    Views:
    595
    Toby Inkster
    Jul 7, 2006
  4. Replies:
    3
    Views:
    668
    dorayme
    Jan 6, 2007
  5. shapper

    Override Css Class

    shapper, Feb 24, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    3,241
    Peter Bucher [MVP]
    Feb 24, 2008
Loading...

Share This Page