TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 04:54:48 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 304
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 311
  • Total: 311

Footer Text Color Question

Started by ronmsf2, April 29, 2005, 12:57:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronmsf2

I've been working on a color scheme based around Mercury theme, and I need to have the text in the footer a different color from the main body text.  I tried simply adding a color to the footer id in the css,


#footerarea
{
                  color: #dde;
  background-color: #003;
}


but that didn't work, so I tried adding a new class for the footer area, and adding that class to the text in index.template.php,

Code ("css") Select

.footertext
{
  color: #dde
}
[code]

[code="php"]
<span class="smalltext footertext"><b>Mercury</b> design by <a href="http://www.tinyportal.co.uk" target="_blank">Bloc</a></span>


Which sort of works, but the two <span>'s I found didn't include all of the footer text.  Some of it seems to be called by a copyright function, theme_copyright().

Ideally there would be a simple way to change change all of the text in the tooter area to a color different from the rest of the board.  Any suggestions?

Thanks,
Ron


Bjørn

Yes,try to make your new class like this instead:

.footertext , .footertext a:link , .footertext a:visited
{
        color: #dde
}
.footertext a:hover
{
        color: red;
}


And just surround both the copyright and the credits with this class.

ronmsf2

Ah yes.. that does make sense.  So, I'm getting closer, but not there quite yet.  I added the css class as suggested,


.footertext , .footertext a:link , .footertext a:visited
{
        color: #dde
}
.footertext a:hover
{
        color: red;
}


and applied the class the the entire footer area by adding the footertext class to the footerarea div.  I'm not sure if that is what you meant be surrounding the copyright and credits with the class.


        <div id="footerarea" class="footertext" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">


The result looks like this,



the remaining text is there, but it still retained the color from the rest of the page,





ronmsf2

Ahhh... got it.  Following the same line of thinking, I added td and span decendents to .footertext


.footertext , .footertext a:link , .footertext a:visited,
.footertext td, .footertext span
{
        color: #dde
}
.footertext a:hover
{
        color: red;
}


Almost there!!  Now I need to work on changing the text color for the icon descriptions...




ronmsf2

Okay... this second part is a bit of a challenge, but it looks like all I would need to do is add a class id to the table that contains the images and text.  Someting like this,

<table class="footertext">

Hopefully I don't need to do this for every <td> tag within the table.

So, as a start, can someone tell me which php file is creating the table to contain the images and text for the topic icons located just above the copyright info?

Thanks!

ronmsf2

Got it!!  Found the table in MessageIndex.Template.php in the default theme folder, so I copied that file to the Mercury theme folder and added the "footertext" class to the table tag, so now it looks like everything is there.



I do hate making this many changes though.  I'm afraid I will have missed something, or when a new version of SMF comes out, I'll have to go in and make changes by hand again.  At any rate, for the time being, this seems to work, and I'm happy with it. 

BTW, sorry for the long string of posts... seems kind of silly, but thought others might be interested in the process and the results...




Bjørn

Indeed, they will be interested. ;)

I just learned a few things about CSS myself, and its amazing how you can expand it to get what you want.


ronmsf2

I was amazed at how much easier it was to make modifications under SMF than phpbb!

Here is the site where I used the Mercury theme.. RML3 Forums.  I still have some tweaking to do, but I'm pretty happy with it.  Comments, good or bad, are welcome.

Thanks so much for making your themes available.  They're absolutely fantastic.

Bjørn

Thank you.

The site looks good. :) I would perhaps lighten the background a tiny bit...just so black lines elsewhere show up some. But thats personal preference.

hivelord

Which reminds me, I'd probably purchase themes should you release some as clean as and futuristic as Helios.

Love it.