Button style not getting applied

Posted on 2013-08-29
Medium Priority
Last Modified: 2013-08-29
I'm helping a friend put a web site together and I've run into a problem with styles not working on some buttons.

Check out the "See our products" and "See our Results" links at the bottom of this page.

I have the code for the button set up in the style section of the site but for some reason it's not getting used.  

I appreciate the help!
Question by:BasilFawlty001

Expert Comment

ID: 39448093

It seems you have an error javascript induced by your embedded Flash player:

uncaught exception: Error in Actionscript. Use a try/catch block to find error.
Line 217

Use Mozilla Firefox + Firebug to catch the error, then go debugging into your website javascript file.

Just for testing purposes, make a copy of your webpage and eliminate the embedded player, then see if styles load and get applied correctly.
LVL 62

Accepted Solution

Julian Hansen earned 2000 total points
ID: 39448706
The problem is that you have errors in your style's section.

For instance on line 155 of the source as viewed with view source there is a missing '} after the BACKGROUND-COLOR: - just ends

Same on 158

164 again after CURSOR:hand;

On 207 after .button:active declaration you have the following starting in the middle of nowhere


Fix those and your button style should work (I would check for other validation errors in CSS and HTML as a matter of course)

Also consider using HTML5 standards
LVL 53

Expert Comment

ID: 39448949
When you run into these kids of problems it is frequently caused by non-standard code.

It is a good idea to validate as you go along.  It only takes a few seconds to run the validators and it can save your many hours trying to fix broken pieces.

for HTML you can validate at: http://validator.w3.org/
for CSS use: http://jigsaw.w3.org/css-validator/

Julian's suggestion that you use HTML5 is also a good idea.  Using older technology just means you are forced into obsolete presentation and have to re-build sooner.


Author Closing Comment

ID: 39449531
It was the crappy CSS.  All fixed and working now.  Thanks!
LVL 62

Expert Comment

by:Julian Hansen
ID: 39449599
You are welcome - thanks for the points.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

627 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