Reputation: 104
I want to display Heading and its content in a single line but it splits into two lines.
For example:
<h3> Some Heading: </h3>
<p> Some Content </p>
In this I want to display it like:
Some Heading: Some Content
If anyone can help solve this, it would be highly appreciated.
Upvotes: 0
Views: 3003
Reputation: 199
Already answered by @Dogukan Cavus.
The Heading and Content can be displayed in Single line by adding display: inline-block to css style.
<h3 style="display: inline-block"> Some Heading: </h3>
<p style="display: inline-block"> Some Content </p>
Example: http://jsfiddle.net/a4aME/1/
Upvotes: 1
Reputation: 5566
Wrap both your tags by a div
and set the div
s display property to flex.
<div style="display: flex">
<h3> Some Heading: </h3>
<p> Some Content </p>
</div>
Upvotes: 0