Solved

Unique Joomla front template page link color problem

Posted on 2014-01-30
7
452 Views
Last Modified: 2014-02-10
I have a website that uses Joomla for content management.  It was developed to have a unique front page outside of the rest of the content that is configurable within Joomla itself.  I am trying to make this front page have a slightly different color scheme than the rest of the site (completely black background instead of half black half silver).  The footer that is on each page includes a link to the sitemap which I would prefer to leave on the front page as well.  The problem is that I cannot independently change the black sitemap link, that shows up as desired (on the silver background) for the rest of the Joomla controlled site,  to be silver on the entirely black background of the unique front page.  I believe I should be able to create a div element and reference this element in the CSS to do just this but anything I try either has no effect or changes all links on the page, including a nav bar at the top of the page.  I don't know if I should maybe try to used the modules.php file I will include the relevant CSS and PHP code below.  The site itself is HERE

index.php:
<footer id="primary-footer" class="container">
	<jdoc:include type="modules" name="footer-navigation" style="navigation" />
</footer>

Open in new window


screen.css:
a:link, a:visited{color:#000;}
a:hover{text-decoration:underline;}

#primary-footer{padding-top:15px; text-align:center; margin-bottom:20px; }
#primary-footer .footer-nav{display:table; padding-top:15px; margin:0px auto; border-top:1px solid #aaa; }
#primary-footer .footer-nav ul{ width:120px; min-width: 700px;}
#primary-footer .footer-nav li{display:inline; margin-right:15px;}

Open in new window

0
Comment
Question by:uescjp
  • 3
  • 2
  • 2
7 Comments
 
LVL 50

Expert Comment

by:Steve Bink
Comment Utility
In your CSS, line 141 is overriding line 138.  Both hit the same target.  The rule below has greater specificity than both.
.footer-nav ul li a:link {
    color: #FFFFFF;
}

Open in new window

0
 
LVL 28

Expert Comment

by:chilternPC
Comment Utility
if you look at the code of the footer on the home page  - its the same as the code for the rest of the joomla site - so I suspect the home page is not independent of the active template. it uses the same id's and classes as the other pages.

Note - although you can't see the link on the home page - Google and other search bots can and will find it which is important part.

if you want a different style page on the home page - create a new template  with your colours, install it and  configure the home page to use that and the other pages to use the existing template
0
 

Author Comment

by:uescjp
Comment Utility
@routinet: I have tried that and the changes does not seem to have any effect.  Adding the ids of #home and #primary-footer changes the footer on all pages but I only want it changed on the front homepage.

@chilternPC: As you said, I only care for my sake.  I do not want to make multiple templates and switch between them for the frontpage and inner pages.  If it is not possible to only effect the front page with CSS then I will leave it as it is.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 28

Accepted Solution

by:
chilternPC earned 350 total points
Comment Utility
looking further into it, if you have joomla 3 you can specify a style sheet
for that page.
create the page specific style sheet. and upload it to somewhere on the site you know.

go to admin and click on menu manager. open the menu and find the home page menu item
click on that.
then click on the tab item called "Page Display".
on this page there is an entry "Page Class"   here you can specify that page specific style sheet.
not tried this myself , but the help says this is for adding styles to individual pages.
0
 

Author Comment

by:uescjp
Comment Utility
chilternPC: That is seeming like the only option.  If noone else has any suggestions in the next few days I'll accept it as the answer but I will likely not do that either as it may be more hassle than it is worth.

Thanks
0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 150 total points
Comment Utility
I believe chilternPC's suggestions is your only route.  You could always use a Joomla extension designed to add a custom style sheet to pages, but I consider that the long way around to adding a page-level class and targeting that instead.

One correction, though: the "Page Class" attribute adds a *class* to the body, not a style sheet.  This means you still need to place the rules in your template's style sheet.
0
 

Author Closing Comment

by:uescjp
Comment Utility
Not what I was hoping for but I understand the limitations of the version of Joomla I am using.  Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now