19 replies [Last post]
chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

I am having a problem getting my CSS links to work....for some reason, in firefox, my Active link isn't working, it's showing an underline and shouldn't be, but the hover and visited seem to be working correctly. I'm not sure what's wrong here, but I'm guessing my coding is bad somewhere. The site is:

http://www.audiadesign.com/FMA/
http://www.audiadesign.com/FMA/main.css

Please help! Thanks in advance

Caposoft
Caposoft's picture
Offline
Enthusiast
Last seen: 8 years 7 weeks ago
Timezone: GMT+1
Joined: 2008-03-16
Posts: 330
Points: 118

Get a doctype

validate your page if it is still giving problems, and if both don't work, return. Hopefully without tables and those single colored images

svamsik
Offline
Regular
Last seen: 14 years 38 weeks ago
Timezone: GMT+5.5
Joined: 2008-04-24
Posts: 12
Points: 0

A:active.link1 {

A:active.link1 { text-decoration: none; color: 000000;}

in that change text-decoration:none; to text-decoration;underline;

and lot off errors in your css also dude check once

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Are you referring to the

Are you referring to the outline around the link when you click on it? That's not :active, but :focus.

You need to keep the order of the rules correctly, so one doesn't mask the other logically.

a:link {}
a:visited {}
a:focus { outline: none; }
a:hover {}
a:active {}

Use care when messin' with the :focus pseudo class. People navigating via the keyboard use the :focus's outline to show them which link or form control they're at.

As has been mentioned, you need a complete DTD to trigger standards mode in browsers, and you must validate the syntax of your markup. Validation and DTDs are discussed in the stickies at the top of each forum.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

ok...the website was made

ok...the website was made for a club, I spent very little time on it and it's a freebie...although the coding isn't great, or even good, it's working and it's WAY better than the nothing that they had....I'm wanting to take AWAY the underline, hence the text-decoration:none but there IS an underline in firefox, when there shouldn't be

ps - the single colored images were requested and not done by me, and it's really not baddd work for free

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 11 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Listen carefuly to the

Listen carefuly to the earlier advice about valadating the code.

It's irrelevant whether what you have done is better than before or better than nowt.

The reason that the link underlines are there appears to be due to the fact that you have some glaring errors in the stylesheet; remove the HTML comments from the top!

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

that was most definitely the

that was most definitely the problem...saves having to put in a doctype and fix ALL of the errors...thanks

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Why would you consider

Why would you consider having a DTD and valid markup to be an onerous burden? It's no more difficult to write valid code than invalid, and it surely gives better results.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

maybe I'm learning and dont

maybe I'm learning and dont KNOW how to write 'valid code' yet, only code that works (and barely at that) and maybe since it's a free website, i dont want to spend 10 times as long to make the source pretty

Caposoft
Caposoft's picture
Offline
Enthusiast
Last seen: 8 years 7 weeks ago
Timezone: GMT+1
Joined: 2008-03-16
Posts: 330
Points: 118

Free work must automatically be less quality?

gary.turner wrote:
It's no more difficult to write valid code than invalid, and it surely gives better results.

gary

As Gary said, it is no more difficult to write valid code. It is not only assuring that a website displays as you desire it to be displayed, it will also help to find an error. You can be happy if you only spend 10 times your work for searching an error that was caused by slutty coding.

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 2 years 15 weeks ago
Bournemouth
Joined: 2007-05-31
Posts: 693
Points: 45

With a little help...

Plus, we like those who make the effort to write valid code here, so if you do have problems with validation because you don't understand something or can't fix something, perhaps we can help? But it's definitely worth doing Smile

Have YOU said Hello yet?
The CSSCreator Hello Thread

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

I guess nobody here

I guess nobody here understands that it is NOT as easy to write valid code when you dont know how and have to look up every single function and how to perfectly properly use it. I have built a site using solid CSS, but it literally took 10x longer if not more, therefore making it not as easy at all. I don't do enough coding anymore to learn it in and out, thus explaining the bad coding. I wouldn't spend 10x longer to find an error than I spent to write the code because the errors were minimal problems, as always, and I would scrap the CSS before I did that on a free website update for a club...lol

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 2 years 5 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Writing valid html may be

Writing valid html may be hard at the start, but that's utterly beside the point! It is NECESSARY!!! There is no other right way to do things. CSS rules simply DO NOT APPLY to invalid HTML.

Writing valid HTML and CSS is an essential skill and you cannot succeed at web design without that skill. You might as well try to write a book without punctuation because punctuation is hard to learn! Actually that would be less harmful than writing invalid HTML. Writing invalid HTML is like writing a story with your own made up spelling for all the words!

And it isn't hard to learn to write valid code. If you are using Firefox you can get tools that will validate your code for you all on their own for gosh sakes! What can be easier than that? Two keystrokes to check your code for validity and that's too heavy a burden for you? If so give up now!

But even if was extrememely hard that's beside the point. It is not an option, it is a necessity.

You really must stop everything at this point and learn how to write valid code and how to validate your code as you go. I do it by second nature and it saves me hours and hours of time I used to waste hunting around to figure out why something wasn't working.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Caposoft
Caposoft's picture
Offline
Enthusiast
Last seen: 8 years 7 weeks ago
Timezone: GMT+1
Joined: 2008-03-16
Posts: 330
Points: 118

Stop bsing

the site wasn't built by you, you are the one messing around with an existing document.

do you believe any of the people in this forum was born with knowledge of html or css? You have not even added a doctype until now. I don't know why you are asking for help, when you don't follow the advice.

Why do you stress out it is for free? You can't seriously expect anyone to pay you for your html and css skills.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

chbrandt wrote:I guess

chbrandt wrote:
I guess nobody here understands that it is NOT as easy to write valid code when you dont know how and have to look up every single function and how to perfectly properly use it.
Everyone here started at the same place, at the beginning. We all understand about the first attempts at authoring a web page.

There are only about 80 html elements, with only about 30 in common usage. Dig in and use your resources. Your factor of 10 tells me you're screwing around instead of getting after it.

Don't tell us it's too much trouble to do something so simple correctly. If that is really your attitude, find a quarter and call someone who cares. We are here to help anyone who shows a desire to learn the craft. It does take some time to master html, but the basics are low-hanging fruit. That's why we're here; to share our experience and knowledge. Show a modicum of clue.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

I wasn't aware that I had

I wasn't aware that I had written any invalid html, only css. I am very fluent in HTML and have been for years. CSS on the other hand, to me, is much more complicated when dealing with div layers and style sheets. If writing correct css is SO simple, I guess I'm an idiot, because I've had all kinds of problems with cross-browser CSS coding that just hasn't existed in my html-coding past. Thanks for the input and help solving this problem.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 2 years 5 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

You've been having so much

The reason you've been having so much trouble with CSS, in all likelyhood, is because you think you can take your current html skills and just sort of tack CSS on top of them. If you've been writing html for years you very likely can't. Good CSS and propler HTML go together and can't work right without each other.

You have to go back to the beginning and learn to write valid, semantic html first. Then, once you've learned how and why to do that, CSS is easily learned.

I've been there, believe me, and I had to take the time to relearn my html skills from the beginning to do it right. It takes a bit of time it's true, but it takes ever so much less time than trying to struggle with CSS on top of invalid and badly formed HTML you are used to writing.

You can't really learn CSS on it's own, you have to re-learn HTML at the same time.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

chbrandt
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-6
Joined: 2007-02-05
Posts: 12
Points: 0

The last/only CSS website

The last/only CSS website I've built is: http://www.audiadesign.com/ Tried on this website, much more so than on the one listed above with the problem that I didn't want to rebuild.

gary, I assure you I wasn't "screwing around instead of getting after it" when I built this website, and I also assure you that it took me at least 10 times as long to build this website while learning CSS and to overcome all of the problems. After getting the idea for this site, I wanted to finish it SO bad, but just didn't have the ability to sit down and do it like I would an HTML site.

While I believe that html validation and css validation to w3c standards really isn't ultra important, as the top websites in the world don't validate and probably never will, I still took the time to validate this website. Thanks

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 years 4 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Let's start at the

Let's start at the beginning. Your server has this in the response header:

Content-Type: text/html; charset=UTF-8
That is the authoritative statement of the character encoding, overruling anything else. Your document has this:which is properly ignored.

The trouble is, your editor saved the document as windows-1252, a proprietary encoding that uses entity values reserved for control characters in all iso-xxxx and unicode encodings. To use it, you'll need to change your server headers. Best, since your server expects it, would be to save-as utf-8 (not Unicode; MS oriented applications really screw that up).

Forcing the validator to accept the windows encoding, there are 84 errors, beginning with no DTD which throws browsers into quirks mode. That alone will make x-browser compatibility a crap shoot.

Looking at the source, I see no indication of semantic or well structured html. The markup is totally incompatible with more than a trivial use of css.

Please try to follow the suggestions you receive, if you want to proceed. There is no problem with your questioning why we say do this or that, and there's no problem with your asking for clarification. There is a problem when you argue from ignorance or you ignore the advice because you already know something that is patently not the case.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 2 years 5 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

chbrandt wrote:While I

chbrandt wrote:
While I believe that html validation and css validation to w3c standards really isn't ultra important, as the top websites in the world don't validate and probably never will, I still took the time to validate this website.

All the most successful supermodels starve themselves nearly to death, so I should do that myself, eh?

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.