Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-09-01 11:53:19

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

[textile] element strong inside li element

hi,

if element strong starting from new line inside li element, textile outputs it as a new li element:

textile:

* Honda 20 hj
*50 eur*

html:

<li>Honda 20 hj</li>
<li>50 eur</li>

is this bug?

Last edited by Gallex (2015-09-01 12:15:25)

Offline

#2 2015-09-01 12:22:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] element strong inside li element

Gallex wrote #294465:

is this bug?

Probably not, try * *50 eur*


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2015-09-01 12:31:46

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [textile] element strong inside li element

uli wrote #294467:

Probably not, try * *50 eur*

this makes the same. i need this:

<ul>
	<li>Honda 20 hj<br>
	<strong>50 eur</strong></li>
</ul>

Offline

#4 2015-09-01 12:38:55

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] element strong inside li element

That HTML doesn’t validate, hence it’s not a Textile fault.

I’m afraid you’ve to try to get that job done by the help of CSS.

Sorry, overlooked that <br> and took it for </li>.

Last edited by uli (2015-09-01 12:44:13)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2015-09-01 12:44:02

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] element strong inside li element

Sorry, can’t find an ad hoc solution, ==<br/>== won’t work either. Someone?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2015-09-01 12:53:48

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] element strong inside li element

uli wrote #294472:

Sorry, can’t find an ad hoc solution

I was wrong again! Try:

* Honda 20 hj ==<br>==
 *50 eur*

Note the space at the start of line 2. I’d call that a bug, the space is actually there to stop Textile from doing its job.

Edit: Looks like you don’t even need the Textile stoppers == around the <br>.

Last edited by uli (2015-09-01 12:55:45)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2015-09-01 15:44:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: [textile] element strong inside li element

Or use css to achieve the line break, e.g.:

* Honda 20 hj *50 eur*
* Jaguar 20 hj *5000 eur*

and then use .my-content-block li strong { display:block; } to make the strong element shift down to the following line.

Or:

* Honda 20 hj %(price)50 eur%
* Jaguar 20 hj %(price)5000 eur%

And .price { display: block; } in your css.

A side-effect: Should you change your layout some time in the future and want that info to appear side-by-side, you don’t have to go back to your pages and remove the br’s, you simply change your css.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2015-09-01 16:03:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [textile] element strong inside li element

jakob wrote #294474:

[…] in the future […]

One more argument re future-proof and pro CSS: As my proposal should be considered a hack, you shouldn’t take for granted that it’ll work like that forever.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2015-09-03 07:15:37

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [textile] element strong inside li element

thank you for contribution!

Offline

Board footer

Powered by FluxBB