Link styling code cleanup

I’m trying to make my code cleaner and one thing that stands out is every link I have on a page results in 4 different lines of code for each one (active, link, hover, normal).

Is there a way to include the link code in the style I specify?

Thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m not sure what you mean here. There are 4 link “states” that are related to how the link is styled and are not part of the hyperlink itself.

Meaning let’s say you wrote out “google.com” as your link.

  1. To that link are 4, what they call, “states” meaning that the “normal or link” state will be styled how the link appears “design-wise” on your site without any interaction from your site visitors.

  2. The “hover” state will be related to how the link appears when a user puts their mouse over the link.

  3. The “active” state will be how the link appears when a user pushes down on the link. Typically this state has the same styling as the “hover” state.

  4. The last state should be “visited” and that is styling related to how the link looks when a user first clicks it, goes to another page, and then returns back to the previous page where they first clicked.

These styling elements are related to how links appear and often people make them styled all the same but your code could be getting “bloated” due to creating individual state styles for links which FW easily allows you to do.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Dan. I understand the 4 “states” and how to set them in FW. The issue is each time I do that for a link it results in 4 new lines of code in html. I am hoping there is a way to avoid that. I was thinking I could create a style with those “states” part of the Extended feature, but haven’t been successful yet.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 23 Oct 2011, 11:56 pm, george wrote:
I was thinking I could create a style with those “states” part of the Extended feature, but haven’t been successful yet.

Perhaps CSS sprites would suit your purpose. Home


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options