Cascading Style Sheets are really weird

So here I was, sitting around and thinking about formatted classes for my paragraphs. Now the result is quite pleasing, but has some side effects. But see for yourself …

Messed up CSS
Messed up CSS

As you can see, the browser is reusing the background-image URL from the <p> element within the <a> element, even though the <a> element initially had none. Even defining putting an background-image: none; into the <a> class doesn’t get me anywhere.

The weird thing is only Firefox is displaying it this messed up (not so weird when you think about how IE 6 treats standards). So if any of you CSS wiz’ got a suggestion, I’m listening πŸ™‚

Thanks to the tip of Dave(?), the issue is fixed now!

4 thoughts to “Cascading Style Sheets are really weird”

  1. (once more with the stuff in the right text boxes; feel free to delete the previous comment, and also fix the comment form so that the text boxes are (a) visible against the background colour, and (b) not /above/ their labels)

    Get rid of that background: inherit on line 24.

  2. Thanks a lot πŸ™‚ Already fixed the labels, still need to fix the box frame. The weather is *way* too good outside πŸ˜‰

    Oh, I also had to remove the background: inherit; on line 29 (a:hover)

    Ok, I also fixed the box frame now, the black border should make them clearly visible πŸ˜›

  3. > Thanks a lot πŸ™‚

    No prob.

    > Already fixed the labels, still need to fix the box frame. The weather is *way* too good outside πŸ˜‰
    > Ok, I also fixed the box frame now, the black border should make them clearly visible πŸ˜›

    Thanks, that’s a lot better (although going all the way to black might be a bit overkill πŸ˜› )

    > Oh, I also had to remove the background: inherit; on line 29 (a:hover)

    Oopsy, missed that one, sorry.

    I forgot to mention before, but the DOM Inspector in Firefox and SeaMonkey (not sure if it’s bundled or a separate extension, nowadays) is handy for debugging this sort of thing. There are various other similar extensions too, but I don’t do this often enough to bother trying them, so I can’t recommend any.

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

This site uses Akismet to reduce spam. Learn how your comment data is processed.