Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-16 17:55:08

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

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

I have a problem that, I think, involves CSS and txp forms too.
I’m trying to realize a blog with different sections (cinema, sport, literature… and so on) and I’d like to customize the light band on the left side of any article…

that I obtain with this:

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

… with the name of the section inside, like the following (section: cinema)

How can obtain, with CSS, an effect like this?

Thanks in advance.

Last edited by candyman (2007-05-16 18:16:16)

Offline

#2 2007-05-16 18:43:15

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

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

You won’t get cinema text to do that, you will need an image.

Off the top of my head without trying it, I’d say something like:
img.cinema {position: absolute; left: -25px; }

And add to .article {position: relative; }


BB6 Band My band
Gud One My blog

Offline

#3 2007-05-16 18:45:49

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

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

Thanks, Zero, but the problem is that I can’t assing different images to the different sections… :|

Offline

#4 2007-05-16 19:43:43

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

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

Try this: name your images as cinema.png, sport.png etc. Then use something like this:
<txp:section><img src=”<txp:section />.png”></txp:section>


BB6 Band My band
Gud One My blog

Offline

#5 2007-05-16 19:53:42

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

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

In the article form, do you mean?

I’ll give a try and let you know. TNX!

Offline

#6 2007-05-16 20:19:18

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

Or you can use an image replace method, like the zem_ir plugin.

Offline

#7 2007-05-16 20:26:49

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

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

Thanks Els, that’s could work. I try.

Offline

#8 2007-05-16 21:06:57

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

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

candyman, yes in a form.

Els, I don’t use many plugins so thanks for the link. It looks very useful!


BB6 Band My band
Gud One My blog

Offline

#9 2007-05-18 08:14:44

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

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

Or you can use an image replace method, like the zem_ir plugin.

This is very useful to replace, for example, the site name with an image but I can’t assign the different sections with their relative images.
How can I use something like this:

<txp:section><img src=”<txp:section />.png”></txp:section>

using the zem_ir plugin if the sections.png (e.g.: sport,png, cinema.png, literature.png…) don’t exist but are dinamically generated by the plugin?

Last edited by candyman (2007-05-18 08:15:22)

Offline

#10 2007-05-18 15:41:13

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

The plugin converts text into an image, so you don’t need existing images. Upload a font and use something like

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

Read the plugin help, it’s all explained (Admin > Plugins, click ‘View’).

Offline

#11 2007-05-18 16:13:22

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

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

I obtain this:

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

Where must I put the TrueType fonts? I used the plugin parameter font with this absolute path:

font=“http://www.maidireblog.it/fonts/abtechia.ttf”

Thanks for your patience.

Offline

#12 2007-05-18 16:45:16

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

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

Tried also:

fontdir="http://www.maidireblog.it/fonts/" font="abtechia.ttf"

getting this:

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

Offline

Board footer

Powered by FluxBB