chintansshah Posted July 25, 2011 Share Posted July 25, 2011 When I use H1 tag, then text will come in next line how I make it in same line. Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/ Share on other sites More sharing options...
floridaflatlander Posted July 25, 2011 Share Posted July 25, 2011 You can't unless you have all the info in the same h1 tag, I'm guessing your wanting big letters at certain parts of your paragraphs. You can use spans like this <p><span class="large">Start of paragraph</span>and here is the rest of the paragraph.</p> Then do a style the style "large" however you want ot to be. Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246714 Share on other sites More sharing options...
chintansshah Posted July 25, 2011 Author Share Posted July 25, 2011 No, but I want <h1> tag only because of SEO. Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246741 Share on other sites More sharing options...
floridaflatlander Posted July 25, 2011 Share Posted July 25, 2011 Then do the same thing except change the p tag to an h1 tag and adjust your your span class if needed or as needed Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246745 Share on other sites More sharing options...
AyKay47 Posted July 25, 2011 Share Posted July 25, 2011 you can use the nowrap attribute or do something like h1 { display: inline; } Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246748 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 h1 { float: left; } Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246795 Share on other sites More sharing options...
AyKay47 Posted July 25, 2011 Share Posted July 25, 2011 h1 { float: left; } what if the h1 tag is to be positioned in the middle or right? I wouldn't recommend using float, although it would work if the text is to be on the left Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246805 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 h1 { float: left; } what if the h1 tag is to be positioned in the middle or right? I wouldn't recommend using float, although it would work if the text is to be on the left agreed, usually is based on the design you are working on Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246808 Share on other sites More sharing options...
chintansshah Posted July 25, 2011 Author Share Posted July 25, 2011 Thanks AYKAY47 h1 { display: inline; } it works Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246894 Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 25, 2011 Share Posted July 25, 2011 please mark as solved. the topic solved button can be found at the bottom left of the page Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246899 Share on other sites More sharing options...
cssfreakie Posted July 25, 2011 Share Posted July 25, 2011 h1 { float: left; } what if the h1 tag is to be positioned in the middle or right? I wouldn't recommend using float, although it would work if the text is to be on the left agreed, usually is based on the design you are working on display:inline is the only sound solution for what the topic starter wanted. no matter what design you have. Keep in mind though not to make these <h1> elements part of a paragraph because that is invalid.(topic marked as solved!) Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1246934 Share on other sites More sharing options...
voip03 Posted July 30, 2011 Share Posted July 30, 2011 is it help full. <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- h1 { display: inline; } em{ font-size:12px;} --> </style> </head> <body> <div align="center"> <h1 >Start of paragraph<em>and here is the rest of the paragraph.</em></h1> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1249400 Share on other sites More sharing options...
AyKay47 Posted July 30, 2011 Share Posted July 30, 2011 is it help full. <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- h1 { display: inline; } em{ font-size:12px;} --> </style> </head> <body> <div align="center"> <h1 >Start of paragraph<em>and here is the rest of the paragraph.</em></h1> </div> </body> </html> this thread has been solved for 5 days... Quote Link to comment https://forums.phpfreaks.com/topic/242732-how-to-remove-line-breaks-after-h1-tags/#findComment-1249534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.