First time here? Check out the FAQ!
2

Feature request: Add classes to body in default skin
 

If the <body> tag of each page had a class that corresponds with its URI:

<body class="questions">
<body class="tags">
<body class="people">
<body class="badges">
<body class="ask">

it would become very easy to apply specific CSS styles to specific pages:

body.tags div.AList { ..... }  /* Rule applies to tags page only */

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 13 years ago
Pekka's avatar
590
Pekka
asked 14 years ago

Comments

see more comments

1 Answer

2

Done a while ago, a page name is added to the class at most pages (but not all yet - only those that required that for the styling).

For example, main page has class "main-page", also multiple classes are used everywhere, at the expense of not supporting IE6, which is almost extinct by now.

Also, added a document on skin customization: http://askbot.org/doc/customizing-skin-in-askbot.html

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 13 years ago, answered 14 years ago
link

Comments

Thanks Evgeny. The great thing about adding classes to the body is that you can target common elements *on a specific page*. I.e. you can say "I want the Ask A Question button to be big and red on the front page, but not on the other pages". At the moment, you would have to touch the HTML for that.
Pekka's avatar Pekka (14 years ago)
As for marking up and freezing important elements, that is certainly a great idea. I'm all for it, if I can be of any assistance let me know.
Pekka's avatar Pekka (14 years ago)
When my custom skin is ready to look at, I'll be happy to push it to the Git repo into a new directory if that's ok.
Pekka's avatar Pekka (14 years ago)
Allright, let's do it if it helps and yes please do commit you r customization it it's ok with you.
Evgeny's avatar Evgeny (14 years ago)
see more comments