You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 2015-03-30 18:35:58
- Lirodon
- Member
- Registered: 2009-01-27
- Posts: 98
Generate additional CSS classes
Okay, so, what if you wanted to arbitrarily apply different style rules to specific parts of the forum? i.e. a certain category?
A quick solution to this would be to populate the body tag of forum pages with CSS IDs and classes based on certain factors, such as page names or forum/category IDs. So for instance, viewing the category page for Feature requests would result in:
<body id="flux-vf" class="fid-9">
I could see potential uses for this.
Offline
#2 2015-03-30 19:30:25
- chris98
- Member
- From: England, United Kingdom
- Registered: 2013-05-31
- Posts: 1,292
- Website
Re: Generate additional CSS classes
The only potential use I could see for this off-hand is for jQuery or JavaScript functions - coul you explain a bit more how you think this would be useful?
Last edited by chris98 (2015-03-30 19:30:52)
Download Aura - Illuminate Your Community.
Why should I use Aura? | Aura demo | Convert to Aura
Offline
#3 2015-03-30 21:02:28
- seven
- Member
- From: Torino, Italy
- Registered: 2010-08-19
- Posts: 314
- Website
Re: Generate additional CSS classes
Make a style and use templates. Look at Victory for an example.
gamezoo.org - serious gaming services for serious gamers.
Offline
#4 2015-03-30 22:01:12
- Franz
- Lead developer
- From: Germany
- Registered: 2008-05-13
- Posts: 6,742
- Website
Re: Generate additional CSS classes
Yeah, but styles cannot really do much in templates. The aforementioned example couldn't be done without changing viewforum.php.
I do think, though, that something like "forum-9" should be the ID, and the item should have an additional class "forum".
Offline
#5 2015-04-02 05:06:37
- Lirodon
- Member
- Registered: 2009-01-27
- Posts: 98
Re: Generate additional CSS classes
I do think, though, that something like "forum-9" should be the ID, and the item should have an additional class "forum".
Yeah, that's what I was wanting. More semantics in the HTML code.
Offline
Pages: 1