html - Align <p> inline next to text -


i trying align styled p tag next echo'ed text once add display:inline; property text not align right.

code:

echo $flight[0]; echo '<p style="display: inline; text-align: right;">'.$flight[11].' - '.$flight[13].'</p><br>'; 

the text does align right. issue an inline element wide content, aligning text left, or center, or right, doesn't change visually. check example below. i've applied border can see what's going on.

to provide solution, please edit question , explain result supposed like.

p { border: 1px dotted red; }
<p style="display: inline; text-align: left;">text aligned left</p>  <br />  <p style="display: inline; text-align: center;">text aligned center</p>  <br />  <p style="display: inline; text-align: right;">text aligned right</p>  


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -