Reputation: 165
I have a content type which has an image and a body and I want them to be inlined . the class of all nodes in HTML file is ".content" and I wrote my css like this:
.content{
display:inline-block;
}
but it doesn't work . anyone has any experience with this? thanks
Upvotes: 1
Views: 145
Reputation: 1967
For IE7 you need to use:
.content{
display: inline-block;
*zoom:1;
*display: inline;
}
This will display inline-block for every browser, except for old versions of IE. IE had a css property(which you could not set through css) called 'hasLayout'. Haslayout is essentialy block (you can style it with widths etc.), but you have to trigger it through 'zoom:1;'.
The asterisks (*) are for IE only styles.
Upvotes: 0
Reputation: 13714
display:inline-block doesn't work in all browsers. If you want actual inline-block behavior, see here (it's complicated):
http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
If you actually want your .content to go inline, then use display:inline instead of display:inline-block.
Upvotes: 1