Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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