Customizing SMF > SMF Coding Discussion

<a class="subject"> doesn't work?

(1/2) > >>

Yoshi:
Hi!

I was writing templates for my modification, and found that when I use <a class="subject"> it just puts normal text on the screen.

This is some of my code:

--- Code: ---echo '
<div class="windowbg', $windowbg == 0 ? '' : '2', '">
<span class="topslice"><span></span></span>
<div class="info">
<a class="subject" name="p', $project['id'], '" href="', $scripturl, '?action=bugtracker;sa=projindex;id=', $project['id'], '">', $project['name'], '</a>
</div>
<span class="botslice"><span></span></span>
</div>';
--- End code ---

Running SMF 2.0.2.

Can somebody help me please? If you need more details please ask :)

MrPhil:
What is the CSS entry for .subject?
Is this file being brought in (<link rel>) on this page?
Does Firebug (or the equivalent) show class subject attributes? Are they as expected?

Yoshi:

--- Quote from: MrPhil on June 22, 2012, 12:36:24 PM ---What is the CSS entry for .subject?
--- End quote ---
See the board index, the board titles for example.

--- Quote ---Is this file being brought in (<link rel>) on this page?
--- End quote ---
Which file?


--- Quote ---Does Firebug (or the equivalent) show class subject attributes? Are they as expected?

--- End quote ---
No idea, I'll check in a moment.

EDIT: Searched index.css:

--- Code: ---/* the board title! */
.table_list tbody.content td.info a.subject
{
font-weight: bold;
font-size: 110%;
color: #d97b33;
}
--- End code ---

Meh, don't feel like porting that over just for that single piece. I'll just use style="those attributes".

MrPhil:

--- Code: ---.table_list tbody.content td.info a.subject
--- End code ---
would only apply to <a class=subject> under a <td class=info> under a <tbody class=content> under a tag (presumably <table>) with class=table_list.

Yoshi:

--- Quote from: MrPhil on June 22, 2012, 03:19:03 PM ---
--- Code: ---.table_list tbody.content td.info a.subject
--- End code ---
would only apply to <a class=subject> under a <td class=info> under a <tbody class=content> under a tag (presumably <table>) with class=table_list.

--- End quote ---
Yeah I figured :)

It works when I just use the parameters in a style= attibute on the <a>. Thanks for pointing it out to me :)

Navigation

[0] Message Index

[#] Next page

Go to full version