Hi allz, Just like we normally bold things in between paragraph, I would like to use <h2> tag and format it with css identifier, the problem I am facing is the text between h2 tag is displayed in separate paragraph breaks paragraph(line break). Anyone know how can I use h2 tag without line break? Thanks in advance
You need to have both the container for the header (ie the H2) and for the text after to have display: Inline set. if the text after isnt in a container then put it within a span
But what's the point? Isn't it better to just make a <span> with css making a bold style and large font?
If you make the header display inline, you won't be able to assign it any dimensions.. so if you were to do something fancy like a background image it wouldn't work like a normal block level element.. if you float it then you can still set dimensions, have background images work properly, etc.
Thank you all for your response, and sorry for responding delay(actually I didn't get my instant email notification of reply to this thread) today I tried to do <h2 style="display: inline"> some text here </h2> but it's still shown on a separate line. Can anybody explain me a little more if I want to do something similar to this what could be the solution.
Uhm... if it's a header, shouldn't you be closing the paragraph, doing the header then opening the paragraph? MAYBE you should be using a grouping DIV instead of a para? I'm not getting the point of the question I guess. Sounds like you are trying to make something that won't validate.
You can make it validate by online validation scripts but it isnt using tags as they are intended and long term may risk Google black listing for underhand tactics.
ok so as per suggestion I have taken my thought down of implementing this. Thanks all for the feed backs