Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Rgvill on October 08, 2022, 11:46:15 PM

Title: Make title bold?
Post by: Rgvill on October 08, 2022, 11:46:15 PM
How do I set this to make it look bolder?

96F53C3D-6CF5-45CD-954E-1F874F8DF3C7.jpeg
Title: Re: Make title bold?
Post by: Julius_2000 on October 09, 2022, 08:38:07 AM
In index.css add

.topic-item-title {
   font-weight: bold;
}

Instead of "bold" or "bolder", you can also use the following numbers (depending on how "bold" you like to go :-) ): 600, 700, 800, 900
Title: Re: Make title bold?
Post by: Rgvill on October 09, 2022, 08:56:05 AM
Quote from: Julius_2000 on October 09, 2022, 08:38:07 AMIn index.css add

.topic-item-title {
   font-weight: bold;
}

Instead of "bold" or "bolder", you can also use the following numbers (depending on how "bold" you like to go :-) ): 600, 700, 800, 900

Added it in /themes/default/css/index.css but it's not working

(https://i.ibb.co/VQDPrg0/4-C7-FD945-3794-41-C2-8-CD3-5-E19077-CBC9-A.jpg)
Title: Re: Make title bold?
Post by: Julius_2000 on October 09, 2022, 09:04:43 AM
Quote from: Rgvill on October 09, 2022, 08:56:05 AM
Quote from: Julius_2000 on October 09, 2022, 08:38:07 AMIn index.css add

.topic-item-title {
   font-weight: bold;
}

Instead of "bold" or "bolder", you can also use the following numbers (depending on how "bold" you like to go :-) ): 600, 700, 800, 900

Added it in /themes/default/css/index.css but it's not working

(https://i.ibb.co/VQDPrg0/4-C7-FD945-3794-41-C2-8-CD3-5-E19077-CBC9-A.jpg)

Yes, sorry, I used the name of the element in my theme, which apparently uses a different one. Let me see.

Edit:

Currently, the Default Theme uses this code in Boardindex.template.php for last posts
function template_bi_board_lastpost($board)
{
if (!empty($board['last_post']['id']))
echo '
<p>', $board['last_post']['last_post_message'], '</p>';
}
Inside the <p></p>, the structure is as of Dev Tools of my browser:
<p>
  <strong>Last post</strong>
    title
   <span class="postby">
      <a></a>
      <a></a>
     <span>
   </p>

But you would have to adapt the code in the php to only address the first anchor (<a>) under postby.

Currently, you can only address the class="postby" as a whole like this:
.postby a {
   font-weight: bold;
}
Title: Re: Make title bold?
Post by: Rgvill on October 09, 2022, 09:19:19 AM
Quote from: Julius_2000 on October 09, 2022, 09:04:43 AM
Quote from: Rgvill on October 09, 2022, 08:56:05 AM
Quote from: Julius_2000 on October 09, 2022, 08:38:07 AMIn index.css add

.topic-item-title {
   font-weight: bold;
}

Instead of "bold" or "bolder", you can also use the following numbers (depending on how "bold" you like to go :-) ): 600, 700, 800, 900

Added it in /themes/default/css/index.css but it's not working

(https://i.ibb.co/VQDPrg0/4-C7-FD945-3794-41-C2-8-CD3-5-E19077-CBC9-A.jpg)

Yes, sorry, I used the name of the element in my theme, which apparently uses a different one. Let me see.

message_index_title :)