Jump to content

Display: Inline with Line Breaks


Gafaddict

Recommended Posts

Is there any possible way for this to render properly:

 

<ul style="display:inline">
<li>Line1<br>Line2</li>
<li>Line1<br>Lin2</li>
</ul>

 

In Firefox etc. it displays each list item on a different line, but I wonder if the display:inline feature works with line breaks. Is there any way to achieve a similar affect if the two won't combine?

Link to comment
https://forums.phpfreaks.com/topic/121800-display-inline-with-line-breaks/
Share on other sites

Is there any possible way for this to render properly:

 

<ul style="display:inline">
<li>Line1<br>Line2</li>
<li>Line1<br>Lin2</li>
</ul>

 

In Firefox etc. it displays each list item on a different line, but I wonder if the display:inline feature works with line breaks. Is there any way to achieve a similar affect if the two won't combine?

 

Although I don't know what you are trying to do... I would recommend you to use separate < li> for the each line. Make it a defintion list or a nested list if you have to. Of course, you may have a reason for what you are trying to do, I simply discourage against it!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.