Hi all..
Can I make DIV tag function as SPAN tag? i.e., removing line-break before and after the DIV tag.
Hi all..
Can I make DIV tag function as SPAN tag? i.e., removing line-break before and after the DIV tag.
DIVs are block level elements which means they have a default display:block
- give it display:inline
(which SPANs have) to override this. Please be a good programmer and do this with CSS not inline styles :)
As others have said, generally you can use display: inline;
but beware of the beast...
Make sure you're aware of differences between browsers on display: inline;
and display: inline-block;
and when you might want to use which: