Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-08 13:47:50

damini
New Member
Registered: 2007-10-01
Posts: 6

Change hyperlink Color

Hi There

I want to change my hyperlink text style just in one place of my page..At moment all hyperlink has color and is underlined and when i keep mouse over hyperlink, underline disappears…It is fine but just at one place I want to change its color and underline style. Please let me know how to do that..I tried to create new style as this

.mar { font-size: 1em; font-weight:bold; border-bottom:0px; color:red; }
.mar a { color: red; border-bottom:0px }

And in my article, it seems like this

<div class = “mar”>

<a href=“http://www.bodysmooth.co.uk/smartlipo-special-offer” target=”_blank”><marquee>Upro 15% Special Discount on Bookings in October 2007</marquee></a>
</div>

but it is not working…please let me know what is the problem

Thanks in advance

Offline

#2 2007-10-08 14:57:21

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Change hyperlink Color

By the way, the marquee element type was first invented for Microsoft’s Internet Explorer and is still supported. The Mozilla Firefox, Opera, and Safari web browsers support it for legacy page compatibility, although many other browsers do not.

So you should use JavaScript to do scrolling-box. But the fix: Your styling marquee, not the link, because marquee is inside the link.

(X)HTML:

<div class = "mar">
	<a href="http://www.bodysmooth.co.uk/smartlipo-special-offer" target="_blank">
		<marquee>Upro 15% Special Discount on Bookings in October 2007.</marquee>
	</a>
</div>

CSS:

.mar a {
	color: #CC0000 !important;
	font-weight: 900 !important;
	font-size: 1em !important /* Er - where you need this? 1em is default size... */;
	border-bottom: 0 !important;
	}

.mar a marquee {
	color: #CC0000;
	font-weight: 900;
	font-size: 1em;
	}

.mar a marquee:hover {
	color: #000;
	border-bottom: 1px solid #000;
	}

Another way is to but the link inside the marquee.

Cheers!

Last edited by Gocom (2007-10-08 14:58:04)

Offline

#3 2007-10-15 18:34:01

dbulli
Member
Registered: 2004-11-22
Posts: 195
Website

Re: Change hyperlink Color

Don’t use MARQUEE !

//color for off
.mar a { color: red; }

//color for hover
.mar a:hover { color: blue; text-decoration: underline; }


nuff-respec ::: dannyb

Offline

Board footer

Powered by FluxBB