Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-05-18 17:11:51

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

Re: Tricky CSS question: name of the section in the border left solid

It took me some time to figure that out too ;) Anyway, don’t use the url, it should be a path. I assume the font is in a directory ‘fonts’ that is in the root? You can try this:

font="web/htdocs/fonts/abtechia.ttf"

If you still get an error, it will show you what is wrong, e.g. if it says The server is missing the specified font 'web/htdocs/web/htdocs/fonts/abtechia.ttf' you’ll know that web/htdocs/ should be left out.
Trial and error will get you where you want ;)

Offline

#14 2007-05-18 19:00:28

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

Tried with:

font="web/htdocs/fonts/abtechia.ttf"

getting this:

Error: The server is missing the specified font '/web/htdocs/www.maidireblog.it/web/htdocs/fonts/abtechia.ttf'.

Should I modify the preset plugin code or, according to you, the problem is another? I can’t figure it out.

p.s I saw that /web/htdocs/www.maidireblog.it/ is the TXP preset option for plugin cache and files in my blog: must I change this?

Offline

#15 2007-05-18 19:03:55

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

Re: Tricky CSS question: name of the section in the border left solid

Try if this works:

font="fonts/abtechia.ttf"

Offline

#16 2007-05-18 19:09:50

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

No :(

I get this:

Error: The server is missing the specified font '/web/htdocs/www.maidireblog.it/fonts/abtechia.ttf'.

The abtechia.ttf is in www.maidireblog.it/fonts (of course)

Offline

#17 2007-05-18 20:58:58

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

Re: Tricky CSS question: name of the section in the border left solid

Did you take out the fontdir attribute?

I can only tell you how it works on my site:
  • site url (in Admin > Preferences) is mysite.com
  • the font file is in mysite.com/fonts/
  • my path to site (see Diagnostics) is /home/mysite/public_html
  • I use font="public_html/fonts/font.ttf" and not fontdir

One more thing to check: I found that if the file name is uppercase (FONT.TTF), you need to use uppercase in the tag as well, otherwise it won’t work.

Last edited by els (2007-05-18 20:59:55)

Offline

#18 2007-05-19 14:33:40

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

Did you take out the fontdir attribute?

Yes. On my site works so:
  • site url (in Admin > Preferences) is www.maidireblog.it (pulling away the www the css stop working)
  • the abtechia.ttf font file is in www.maidireblog.it/fonts/
  • my path to site (see Diagnostics) is: /web/htdocs/www.maidireblog.it/home
  • I use font="fonts/abtechia.ttf" and not fontdir

The file name isn’t uppercase.

putting:

<txp:zem_ir position="top center" font="fonts/abtechia.ttf" angle="90" fontsize="14" color="#000" backgroundcolor="#fff" wraptag="h2" padding="4"><txp:section title="1" /></txp:zem_ir>

I get

Error: The server is missing the specified font '/web/htdocs/www.maidireblog.it/fonts/abtechia.ttf'

:(

Last edited by candyman (2007-05-19 14:35:12)

Offline

#19 2007-05-19 15:22:35

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

Re: Tricky CSS question: name of the section in the border left solid

Want to try one more thing?

font="home/fonts/abtechia.ttf"

Offline

#20 2007-05-19 15:28:42

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

Yes!!! I don’t know how but It works! MANY thanks, Els! :D

p.s.: I saw you didn’t put the www in yoursite URL: is this better?

Offline

#21 2007-05-19 16:03:37

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

Well, I almost what I wanted. Now, thanks to Els’s code, the section name appears correctly, the problem is to collocate it in the right place.

I’ve tried with top left parameter of the zem_ir plugin but the image appears always distant from the left band…

… that I’ve create with this:

.article
{
	border-left: 50px solid #f6f5ee;
	padding: 0 0 0 10px;
	line-height: 150%;
	text-align: justify;
}

The question is: can an image be collocated OVER a CSS-made band?

Offline

#22 2007-05-19 18:32:02

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

Re: Tricky CSS question: name of the section in the border left solid

candyman wrote:

Yes!!! I don’t know how but It works!

It’s because of the diagnostics: the path to your site (the root) is /web/htdocs/www.maidireblog.it/home, and the error always adds /web/htdocs/www.maidireblog.it/ before the path in your tag, so the path to the font had to start with home/ :)

p.s.: I saw you didn’t put the www in yoursite URL: is this better?

It doesn’t really matter, it works with and without. No plugin will stop working because of that. I’m just lazy ;) And there is something to say for using just one of both.

As for the positioning: I’m sure it’s possible. You can also add the attribute class and position that in your CSS. But there are others here that know a lot more about CSS than I do…

Offline

#23 2007-05-20 07:59:41

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Tricky CSS question: name of the section in the border left solid

Tried to add a class (verticalSection) but, even if I reduce the code to minimal terms:

<txp:zem_ir  class="verticalSection"><txp:section title="1" /></txp:zem_ir>

I get a duplicate of the section title: one formatted by the CCS, the other generated by the zem_ir plugin itself.
The only one solution is to find a way to pull the section name down adding to this:

<txp:zem_ir position="top left" font="home/fonts/abtechia.ttf" angle="90" fontsize="14" color="#000" backgroundcolor="#fff" wraptag="h2" padding="4"><txp:section title="1" /></txp:zem_ir>

the right plugin parameter.

Anyway thanks for the help, Els.

p.s.: very useful the article about canonical URLs too.

Last edited by candyman (2007-05-20 08:01:02)

Offline

Board footer

Powered by FluxBB