[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • Last Modified:

Unique Joomla front template page link color problem

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
uescjp
Asked:
uescjp
  • 3
  • 2
  • 2
2 Solutions
 
Steve BinkCommented:
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
 
chilternPCCommented:
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
 
uescjpAuthor Commented:
@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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
chilternPCCommented:
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
 
uescjpAuthor Commented:
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
 
Steve BinkCommented:
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
 
uescjpAuthor Commented:
Not what I was hoping for but I understand the limitations of the version of Joomla I am using.  Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now