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
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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.