Crazy Text behaviour after applying CSS

Crazy Text behaviour after applying CSS

by corcoran _ -
Number of replies: 2

guys.

 

i've slipped the following:

.c0 img {display:none;}

.c1 a:hover {background-color:#ff00ff; display:block;width:100%;}

into my CSS to reduce the amount of moodle imagery that shows up - but when i'm using the hover style shown there (and the colour is just for visual at the moment!) i get spacing above and below the lines? it's very very strange - the text'll jump up and down and the scrollbar scrolls a bit crazy -- anyone had any problems doing this?

Attachment show.jpg
Average of ratings: -
In reply to corcoran _

Re: Crazy Text behaviour after applying CSS

by Greg Lyon -
This is probably due to the fact that the .c1 a doesn't have dislpay:block when it's NOT hovered, and that the default (in your browser) is for some arbitrary margin or padding to be added to elements with display:block.  So, you'll probably have to check on the settings for .c1 a (if there are any), and perhaps add margin:0;padding:0; to your .c1 a:hover.  You may have to add back in a bit of padding if it compresses too much after this change.  Alternately you could remove the display:block from your css, but that will cause it's own problems...(e.g. the background color won't extend past the text when you hover).
In reply to Greg Lyon

Re: Crazy Text behaviour after applying CSS

by corcoran _ -
greg cheers for the reply but alack! it's much the same. i've never had the problem before in 'regular' css (as opposed to moodled css *little shudder*).  i just don't get it; i've even changed the width to 50% which is ample enough for the text on the line but still doing it.  pesky. it's only slightly aesthetic so i might abandon it and comb through the rest of the odd css in my moodle site smile