OK as the title says I’ve got a div which is prepended and dynamically loaded. The problem I have is that I can’t split the css on this one as it parses also whole strings. The usage is like that: I’ve got a @username somewhere in the string. If the user hovers it a div with informations will get prepended to the current username. Now there is the problem that I’ve allowed users to post images in this text also. As the autolinker is flexible it doesn’t know the image sizes and restrictions and I want to leave it like that! So I define css classes which look like that:
.minpost img{ max-height: 30px; max-width: 30px; }
Of course I don’t need to mention that this attribute is also inherited by the prepended div. And that I don’t want to! nifty little tricks like !important won’t work for me.
Ah and btw I thought about the solution as to set the images as backgrounds in the prepended divs as well, but I wanted to know if there is another solution. So I am asking you guys. If you need further informations just ask?!
— Edited —
http://jsfiddle.net/UAgDA/43/ <— added a jsfiddle showing the problem
You need to reset
max-widthandmax-heighttononewhen inside#message: