Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-02-28 17:45:33

thijs
Member
Registered: 2012-04-17
Posts: 39

[SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

I think I noticed this in the previous install, that there is a space inside of the id-name of the body element… i.e. the id=” front-page”. At least firefox won’t execute any css styles while the space is there.
Is there a fix for this? Other sections have proper body classes with no space in front, so I am assuming it is a bug.

working example here: http://thijsvissia.nl/

thanks for any help!

Thijs

Last edited by thijs (2013-02-28 17:52:51)

Offline

#2 2013-02-28 19:10:09

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

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

Great illustrations, Thijs!

Please post the code you use to insert the id.


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

Offline

#3 2013-02-28 20:00:18

thijs
Member
Registered: 2012-04-17
Posts: 39

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

thanks, uli :)

Sorry I didn’t mention that, I’m using an adaptation of the default theme, so the code is from there:

<body id=”<txp:if_section name=”“>
<txp:if_search>search<txp:else />front</txp:if_search><txp:else /><txp:section /></txp:if_section>-page”>

Offline

#4 2013-02-28 20:26:37

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

I think it’s the line break. Try if removing it helps, like this:

<body id="<txp:if_section name=""><txp:if_search>search<txp:else />front</txp:if_search><txp:else /><txp:section /></txp:if_section>-page">

Last edited by els (2013-02-28 20:27:01)

Offline

#5 2013-02-28 20:29:44

thijs
Member
Registered: 2012-04-17
Posts: 39

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

Okay, I actually figured it out, some stuff was missing at the end of this bit of code.

<body id="<txp:if_section name=""><txp:if_search>search<txp:else />front</txp:if_search><txp:else /><txp:section /></txp:if_section>-page">">

I’m not so good spotting stuff like this in nested bits of code.

Thanks, though!

{Edited to add Textile’s bc. for better readability. Uli}

Last edited by uli (2013-02-28 21:46:48)

Offline

#6 2013-02-28 20:57:21

thijs
Member
Registered: 2012-04-17
Posts: 39

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

Actually, Els, that was the cause. Thanks both of you!

Offline

#7 2013-02-28 22:05:39

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

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

Glad you’ve found it, just …. yours should print an extra ">, sorry :)


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

Offline

#8 2013-02-28 22:32:29

thijs
Member
Registered: 2012-04-17
Posts: 39

Re: [SOLVED] leading space in the body id for the front-page? (txp 4.5.4)

^ yes, it did :) doh!

Offline

Board footer

Powered by FluxBB