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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -