Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-07-05 11:57:19

Katalonian
Member
From: Baku, Azerbaijan
Registered: 2010-04-18
Posts: 219
Website

Re: using txp tags in css

Els, uli and Gocom

Thanks very much. your advices helped!

Last edited by Katalonian (2010-07-05 11:59:04)


<txp:txp_me />

Offline

#14 2010-07-08 10:02:54

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: using txp tags in css

or see Store external text-based files as TxP articles

In articles body your may use any TxP tags.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#15 2010-07-08 20:31:11

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: using txp tags in css

Sorry, but I don’t understand what you are talking about here. Can someone give an example with an TxP-Tag in the CSS-declaration or CSS-file? Which TXP-tag provide, for example, an information about the screen resolution? For this exists the media queries.

Offline

#16 2010-07-10 20:43:00

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: using txp tags in css

geoff777 wrote:

… I could detect the screen resolution of the site visitor, and then call a form in which I could calculate appropriate height and width variables for container and column <div>s.

Use javascript for it, because detect the screen resolution available only on client side.

1. Detect the screen resolution (screen.width)
2. Calculate all width
3. Generate inline CSS. (document.write… )


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#17 2010-07-13 13:21:37

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: using txp tags in css

Do you need to use javascript to detect screen size? I thought it could be done with css @media

I used to think that txp tags in css files would be a great idea, but since using the horrible stylevars system in vBulletin (which is a similar concept) I’m not so sure. As Els said earlier it’s much easier to get specific pages using <body id=”<txp:section />”> and other similar techniques and do targeted conditional css such as…

#actualsectionname #header {background-color:#f00;}

Offline

Board footer

Powered by FluxBB