Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-03 02:49:05

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

alternating list styles

Applying a style to a * list type in textile, I end up styling the ul tag.

Is there a way to specify the list tag? I could easily style away the ul, but that would be semantically incorrect and I don’t care for that all that much.

My goal is to provide a client with the option for styling lists alternately: Ala: <pre>
  • (alt) hey there
  • normal
  • (alt) how ya doin?
    </pre>

minus the spaces
Any ideas?

Last edited by ma_smith (2006-05-03 02:50:33)


Offline

#2 2006-05-03 08:42:27

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: alternating list styles

These may be of use…

http://bitesizestandards.com/bites/automatic-coloured-rows

http://www.thewatchmakerproject.com/journal/309/stripe-your-tables-the-oo-way

They’re for tables but with a bit of fiddling I think they could work for lists.

Graham.

Offline

#3 2006-05-03 10:26:33

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: alternating list styles

Graham,
Thanks.

I am really looking for the textiled option.

Typical: I didn’t explain myself well :)

M


Offline

#4 2006-05-03 16:46:19

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: alternating list styles

Is there a way to specify the list tag?

I don’t believe there is.

Offline

#5 2006-05-03 20:20:52

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: alternating list styles

thx mary :)


Offline

#6 2006-05-17 15:56:19

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: alternating list styles

Hello Mathew,

You could try…

  • This is the first item.
  • This is the second item.
  • This is the third item.
  • This is the fourth item.

Done using spans or with classes or inline styles…

<pre>
  • This is the first item.
  • This is the second item.
  • This is the third item.
  • This is the fourth item.
    </pre>

Would that do the trick?

Last edited by net-carver (2006-05-17 16:01:57)


Steve

Offline

#7 2006-05-17 16:44:41

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: alternating list styles

It would, but it defeats the purpose of making it easy (or easier) for end users.
and, its an inline style, which I prefer not to use.
Thanks for thinking of it though.

Preciate it,

Matthew


Offline

#8 2006-05-18 00:20:05

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: alternating list styles

Matthew,

The second styled row in the example I gave above is only using an inline style for the purpose of demonstrating it here on the forum. If you look at the source you can see it is also appending a class…

<pre><code>* %(alt_class) Here is my row.%</code></pre>

It’s pretty simple. If you wanted to get the class on the li itself you’d probably have to hack your client’s textile file.

Last edited by net-carver (2006-05-18 00:21:27)


Steve

Offline

#9 2006-05-18 12:19:12

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: alternating list styles

Thanks Netcarver.


Offline

Board footer

Powered by FluxBB