CSS and Links

I have the following javascript function:

function setupABarTables() {

// set classes for Action bar

var vTable = document.getElementsByTagName("Table")[0];

vTable.className = "ABTable";

var ac = vTable.getElementsByTagName("TR" );

for (i=0; i<ac.length;i++) {

	ac[i].className = "ABRow";

} 

var ac = vTable.getElementsByTagName("TD" );

for (i=0; i < ac.length;i++) {

	ac[i].className = "ABCell";

	ac[i].onmouseover = function() {this.className = "ieHover";}

	ac[i].onmousedown = function() {this.className = "ieClick";}

	ac[i].onmouseout = function() {this.className = "ABCell";}

} 

}

and the following in my onLoad event:

setupABarTables();

and the following Style sheet…

.ABTable {

	margin-top: 0px;

	background: #2B5D9F;

}



.ABCell {

	font: 8pt Verdana;

	padding: 5px 8px 3px 5px;

	border: 0;

	background-color: #2B5D9F;

	line-height: 1.9em;

	

}



.ieHover, .ieClick {

	font: 8pt Verdana;

	padding: 4px 7px 2px 4px;

	border: 0;

	background-color: #DDD;

	line-height: 1.9em;

}



.ABCell img,  .ieHover img, .ieClick img {

	float: left;

}



.ABCell a, .ieHover a, .ieClick a, a:link, a:visited, a:active {

	text-decoration: none;

	color: white;

}



.ieClick {

	border-top: 1pt AAA solid;

	border-left: 1pt AAA solid;

	border-bottom: 1pt white solid;

	border-right: 1pt white solid;



}



.ieHover {

	border-top: 1pt white solid;

	border-left: 1pt white solid;

	border-bottom: 1pt AAA solid;

	border-right: 1pt AAA solid;



}

I am using this in my $$ViewTemplate…

It is supposed to find the first table… which is always the action bar and apply some styles to it…

It works great, except that the rest of my links in my view also have the style applied to them as well…

I think it is this part of the style sheet is causing the problem…

.ABCell a, .ieHover a, .ieClick a, a:link, a:visited, a:active {

	text-decoration: none;

	color: white;

}

but not sure…

By the way, I got this code in an example database that was presented at the DevCon conference in Las Vegas last week.

Can anyone please give me some guidance?

Thanks so much…

Subject: CSS and Links

a:link, a:visited, a:active sets the default style for all links on the page.

Subject: RE: CSS and Links

that is what I thought…now have to figure out how to change…

Subject: RE: CSS and Links

It’s simple enough, just a lot to type. You need to do something like this:

.ABCell a:link,

.ABCell a:active, .ABCell a:visited {blah: blah;}

Subject: RE: CSS and Links

thanks! that worked like a charm… appreciate your help as always…

Subject: RE: CSS and Links

You could try changing

.ABCell a, .ieHover a, .ieClick a, a:link, a:visited, a:active {

to

.ABCell a, .ieHover a, .ieClick a, .ABCell a:link, .ABCell a:visited, .ABCell a:active {

but I am not sure the CSS control is so fine tuned.

Subject: RE: CSS and Links

that worked fine… now I see… thanks so much… missed you at the conference… thought you’d be there w/a vendor booth set up…

Thanks…

Subject: *Couldn’t make it (family wedding to attend). Next time perhaps.

Subject: CSS and Links - Good catch Ben

This was from an example in a session I did at the Recent Advisor DevLive show. I will fix it for the next version of the show.

Alos, can we hold you to showing up at more than one show per year???

Newbs

Subject: RE: CSS and Links - Good catch Ben

No problem. I figured it was either you or Rocky…

As for attending more shows, recently, I seem to be doing one European conference (usually Germany), one user group meeting and Lotusphere per year. If a different conference is in an interesting place (e.g., not Las Vegas, although that wasn’t the reason this time) and at a time I can get away, I’d be happy to do it. I also got tired of the sessions I was doing before and have been working on some new ones, so I am more likely to present new stuff, except that Genii also have some new products (CoexEdit in particular), so I might wind up showing instead of presenting. Of course, I also have to pay enough attention to realize a show is coming up, and I always seem to figure it out about two weeks before it happens. Sigh!

How was that for a non-answer? LOL