Shape 5

Joomla Templates => Big Picture - Club => : ccvid August 06, 2014, 03:13:05 PM



: Link Color
: ccvid August 06, 2014, 03:13:05 PM
How would I change the overall link color on the website.  I've been adding <span style="color: #0099ff;"></span> to links in modules and articles... I think I like it enough I'd like the color change to be a site-wide thing.

Thanks!


: Re: Link Color
: mikenicoll August 06, 2014, 04:34:06 PM
Hello,

In the Template.CSS you will see a call for the default link value like so:

:
a {
    text-decoration: none;
}

The thing is even if you add a color here most of the links used on the site are called more specifically throughout the site. For example the heading links used in the components have this CSS:

:
Template.CSS - Line 675
.item h2 a, .item h2, .page-header h2 a, .page-header h2 {
    color: #000000;
    font-size: 1.5em;
    font-weight: 300;
    margin-bottom: 15px;
}

Which would overrule any default a { color.

In-lining link colors isn't really a good practice as all your styling should be kept in a separate file most of the time. You can always add a class or id to the elements you are adding and stylize them in the custom.css file to be cleaner. Here is an example:

HTML

:
<div class="border"> This Div has a Border </div>

CSS

:
.border {
border: 1px solid #000000;}

Then you can reuse the class css on any div you want in the future. It looks much cleaner than adding something like this to everything:

:
<div style="border: 1px solid #000000;">  This Div has a Border </div>

Be sure to utilize Firebug or Chrome Developer Tools to easily identify where link colors are being generated from.

Regards,


: Re: Link Color
: ccvid August 07, 2014, 09:04:11 AM
In the Template.CSS you will see a call for the default link value like so:

:
a {
    text-decoration: none;
}

That's exactly what I needed.  I'm cool with heading and menu links being different colors.  Thanks for the help!

Ben


: Re: Link Color
: mikenicoll August 07, 2014, 08:36:11 PM
No problem :)