Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Mozilla took up this issue with its :empty pseudo-selector, but unfortunately other browser vendors have not followed suit, and it has not been standardized either.
If you use jQuery you could do something like this:
Code:
$(document).ready(function() {
$('p:empty').css({margin: 0});
});
This will only work with JavaScript enabled of course. Don't do the same thing in your stylesheet, however, as I just read that Safari will then apply this style to every P element.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
Last edited by wayfarer07; 12-19-2010 at 04:33 PM..
|