• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

CSS question: Set image to use a class or put image in span tags?

igowerf

Diamond Member
I have an image that I want to position. Should I directly use the class or id with the image (<img id="foo" src="bar.gif">) or should I surround it with span/div tags (<span id="foo"><img src="bar.gif"></span>)? It seems to work both ways in Firebird and MSIE.
 
Well.. an image is inline, surrounding it with a span seems pointless to me, surrounding it with a div would make it positionable like a block element, eh, just kinda depends on what you want to do.

*Ideally*, your markup should not be determined by what you want your css to do, they are supposed to be entirely seperate 😉 (but things never work out that way)
 
Ok. I'm obviously missing something here. 😛 I'm gonna go read up on inline vs. block tags. Thanks.


EDIT: Ok. I googled it and now I feel dumb. "inline" and "block" are pretty self-explanatory. 😱
 
Back
Top