I'm not a css expert, but as i understand the css <span> and <div> tags can be interchangeable by manipulating their css properties. I think that what i need is something between the 2. Correct me if i'm wrong, but div elements appear after after each other (vertically), whilst span elements appear one after the other horizontally (in the space available).
i.e div- display: block;
span- display: inline;
What i need is an INLINE element. Now the problem is that i am using some javascript to highlight the area, for example the following is some text in my page:
<div> or <span>
fsdfsd fdsf fsdf
fdsf fsd
fdsf fdsf fdsf
sdfsdf
</div> or </div>
I need the area to appear INLINE so i used span. But when i hover over the area only the text is highlighted, when in fact i need the square/block area which encompasses all of the text to be highlighted. I realised that this effect can be caused by <div>, but ofcourse i need the area to be inline. Can i acheive the effect i want by inlining some css to a div or span?
Start Free Trial