Home > Life > Cascading Style Sheets are really weird

Cascading Style Sheets are really weird

July 26th, 2008

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!

Life ,

  1. dleverton
    July 26th, 2008 at 10:27 | #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. July 26th, 2008 at 10:43 | #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 :P

  3. dleverton
    July 26th, 2008 at 12:43 | #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 :P

    Thanks, that’s a lot better (although going all the way to black might be a bit overkill :-P )

    > 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.

  1. No trackbacks yet.
Comments are closed.