Using "a:visited" isn't working.

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 5170 Views - Last Post: 20 December 2012 - 11:45 PM

#1 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Using "a:visited" isn't working.

Posted 19 December 2012 - 02:04 PM

So I have a button that I'm using, it's blue when not in use and purple when it hovers. I want to use text-decoration: line-through; when it's been visited, but no matter what I use in "a:visited" it never changes anything.

Here's the CSS for the button:

.meira
{
	height: 10%;
	width: 20%;
	display: inline-block;
	font-size:0.8em;
	font-style:italic;
	border: 2px solid #6699FF;
	border-radius: 5px;
	-moz-border-radius:5px;
	-webkit-border-radius: 5px;
	padding: 2px;
	margin-bottom: -30px;
	margin-top: -10px;
	
	background: rgb(73,192,240); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ5YzBmMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyY2FmZTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, rgba(73,192,240,1) 0%, rgba(44,175,227,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(73,192,240,1)), color-stop(100%,rgba(44,175,227,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#49c0f0', endColorstr='#2cafe3',GradientType=0 ); /* IE6-8 */
	
	
}

.meira a
{
	font-family: Verdana, Sans-serif;
	font-weight: bold;
	text-decoration: none;
	color:white;
}

.meira:hover
{
	padding: 5px;
	
	background: rgb(229,112,231); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1NzBlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ3JSIgc3RvcC1jb2xvcj0iI2M4NWVjNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhODQ5YTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);

background: -moz-linear-gradient(top, rgba(229,112,231,1) 0%, rgba(200,94,199,1) 47%, rgba(168,73,163,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,112,231,1)), color-stop(47%,rgba(200,94,199,1)), color-stop(100%,rgba(168,73,163,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e570e7', endColorstr='#a849a3',GradientType=0 ); /* IE6-8 */
}

.meira:visited
{
		text-decoration: line-through;
}



And the HTML:

<div class = "meira"><a href = "http://www.google.com" target="_blank" title = "Viltu ekki lesa restina?">Lesa meira >></a></div>



And here's a picture of the button(untouched above, visited below), it gets bigger when you hover over it:

Posted Image

So, what could be causing ":visited" to not work?

":active" works btw, but that's just while you're clicking it :P

Is This A Good Question/Topic? 0
  • +

Replies To: Using "a:visited" isn't working.

#2 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 19 December 2012 - 02:20 PM

These :visited etc. selectors should be given in the order LVHA (love-hate). For example:
.style3 {font-family: "Elementary SF"; font-size: 18px;}
.style3 a:link {color: #000000); 
.style3 a:visited {color:#000000};
.style3 a:hover {color: #b22222};
.style3 a:active {color: #9acd32};

But it may be that the font used is not able to create a line-through.

Alternatively, all the browser-specific rules are interfering. Try removing all of them temporarily.

FWIW I seem to recall that line-through is noted for being flakey and you might wish to consider an alternative.

This post has been edited by andrewsw: 19 December 2012 - 02:23 PM

Was This Post Helpful? 2
  • +
  • -

#3 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 19 December 2012 - 02:29 PM

Or consider a curious alternative :bigsmile:
.meira:visited {
    background:url('../images/aonepixelimage.png') repeat-x 0 10px;
}

Was This Post Helpful? 1
  • +
  • -

#4 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 10:03 AM

View Postandrewsw, on 19 December 2012 - 02:20 PM, said:

These :visited etc. selectors should be given in the order LVHA (love-hate). For example:
.style3 {font-family: "Elementary SF"; font-size: 18px;}
.style3 a:link {color: #000000); 
.style3 a:visited {color:#000000};
.style3 a:hover {color: #b22222};
.style3 a:active {color: #9acd32};

But it may be that the font used is not able to create a line-through.

Alternatively, all the browser-specific rules are interfering. Try removing all of them temporarily.

FWIW I seem to recall that line-through is noted for being flakey and you might wish to consider an alternative.


Yeah, I changed it so it would be in the LHVA order, but nothing works in visited except changing the color of the text :P Could it be because it's using gradient? Tried using overline and underline too but nothing showed.
Was This Post Helpful? 0
  • +
  • -

#5 IJET  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 93
  • View blog
  • Posts: 121
  • Joined: 14-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 10:22 AM

Hi Nublet.

You may want to check out this link: Mozilla or even do a quick Google search on it. From what I have gathered, there's only certain styles that can be applied anymore and the effect you want isn't one of them. It can be applied to normal text, but not links.
Was This Post Helpful? 3
  • +
  • -

#6 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 10:25 AM

Hello. Yes, as I indicated, it could be some of the browser-specific (-moz, -webkit, etc.) that is conflicting. I would comment or delete all of these settings to see if the line-through appears. If it does, then I would re-instate these rules in stages until I determine which one is conflicting.

I might even (if it were me..) consider putting the a-links in a SPAN, to provide an extra level of separation from the container-DIV.

Added: To add to IJETs helpful information, I think most users might be a little off-put if you strike-through a link; it is not expected behaviour.

This post has been edited by andrewsw: 20 December 2012 - 10:30 AM

Was This Post Helpful? 1
  • +
  • -

#7 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 10:29 AM

View PostIJET, on 20 December 2012 - 10:22 AM, said:

Hi Nublet.

You may want to check out this link: Mozilla or even do a quick Google search on it. From what I have gathered, there's only certain styles that can be applied anymore and the effect you want isn't one of them. It can be applied to normal text, but not links.

Ah, I see. That's a little disappointing :c But thanks for letting me know :) , I guess I'll just have to turn the color of the text to gray or something I suppose :P
Was This Post Helpful? 0
  • +
  • -

#8 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 10:52 AM

View Postandrewsw, on 20 December 2012 - 10:25 AM, said:

Hello. Yes, as I indicated, it could be some of the browser-specific (-moz, -webkit, etc.) that is conflicting. I would comment or delete all of these settings to see if the line-through appears. If it does, then I would re-instate these rules in stages until I determine which one is conflicting.

I might even (if it were me..) consider putting the a-links in a SPAN, to provide an extra level of separation from the container-DIV.

Added: To add to IJETs helpful information, I think most users might be a little off-put if you strike-through a link; it is not expected behaviour.

I just wanted to do it so you'll see that you've already visited that link. I think it's a little bland to just change the color, at least when it's in a button, I feel like none of the colors match the color of my button you know? But I don't know, maybe I wouldn't have liked it if I'd been able to see it, just wanted to try it c:
Was This Post Helpful? 0
  • +
  • -

#9 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 11:07 AM

Oops. Actually, the visited a link is within the div with class meira, so it should be

.meira :visited { }
/* or */
.meira a:visited { }

Sorry, only just spotted this. (It was working for hover since this can apply to the whole DIV.., but visited must apply to the link!)

This post has been edited by andrewsw: 20 December 2012 - 11:09 AM

Was This Post Helpful? 0
  • +
  • -

#10 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 11:11 AM

View Postandrewsw, on 20 December 2012 - 11:07 AM, said:

Oops. Actually, the visited a link is within the div with class meira, so it should be

.meira :visited { }
/* or */
.meira a:visited { }

Sorry, only just spotted this. (It was working for hover since this can apply to the whole DIV.., but visited must apply to the link!)


Yeah, I figured that out after I made the thread and fixed it, forgot to edit the thread, sorry about that :P
Was This Post Helpful? 0
  • +
  • -

#11 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 11:48 AM

Hope it's okay if I ask one more question on this thread, don't want to make another one :P/>/> But how can I make the whole button clickable instead of just the text?

Tried this:

.meira a:link, .meira a:visited, .meira a:hover, meira a:active
{
  display: block;
}

.meira:hover
{
	padding: 5px;
	display:block;
	background: rgb(229,112,231); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1NzBlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ3JSIgc3RvcC1jb2xvcj0iI2M4NWVjNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhODQ5YTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);

background: -moz-linear-gradient(top, rgba(229,112,231,1) 0%, rgba(200,94,199,1) 47%, rgba(168,73,163,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,112,231,1)), color-stop(47%,rgba(200,94,199,1)), color-stop(100%,rgba(168,73,163,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e570e7', endColorstr='#a849a3',GradientType=0 ); /* IE6-8 */

border-color: #CC33CC;
}




If I use display:block in both selectors it works but the rest of the hover tag has no effect anymore, if I only use it on .meira:hover it doesn't work or if I only put it on the first selector. I tried removing .meira:hover from the first selector and using display:block on both then and that didn't work either. What can I do to fix this?

This post has been edited by Nublet: 20 December 2012 - 11:49 AM

Was This Post Helpful? 0
  • +
  • -

#12 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 12:11 PM

Something like:

div.meira {
    height: 20px;
    width: 50px; /* is the width known? */
}
.meira a {
    display: block;
    line-height: 20px; /* same as DIV height - centres the link */
    /* or use padding.. padding: 5px 10px; */
}

This post has been edited by andrewsw: 20 December 2012 - 12:12 PM

Was This Post Helpful? 0
  • +
  • -

#13 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 12:37 PM

View Postandrewsw, on 20 December 2012 - 12:11 PM, said:

Something like:

div.meira {
    height: 20px;
    width: 50px; /* is the width known? */
}
.meira a {
    display: block;
    line-height: 20px; /* same as DIV height - centres the link */
    /* or use padding.. padding: 5px 10px; */
}

Height is 10% and width is 20%.

Here's the entire CSS for the button:

.meira
{
	height: 10%;
	width: 20%;
	display: inline-block;
	padding: 2px;
	font-size:0.8em;
	font-style:italic;
	border: 2px solid #6699FF;
	border-radius: 5px;
	-moz-border-radius:5px;
	-webkit-border-radius: 5px;
	margin-bottom: -30px;
	margin-top: -10px;
	
	background: rgb(73,192,240); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ5YzBmMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyY2FmZTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, rgba(73,192,240,1) 0%, rgba(44,175,227,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(73,192,240,1)), color-stop(100%,rgba(44,175,227,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#49c0f0', endColorstr='#2cafe3',GradientType=0 ); /* IE6-8 */
	
	
}

.meira a
{
	font-family: Verdana, Sans-serif;
	font-weight: bold;
	text-decoration: none;
	color:white;
}

.meira:hover
{
	padding: 5px;
	display:block;
	background: rgb(229,112,231); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1NzBlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ3JSIgc3RvcC1jb2xvcj0iI2M4NWVjNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhODQ5YTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);

background: -moz-linear-gradient(top, rgba(229,112,231,1) 0%, rgba(200,94,199,1) 47%, rgba(168,73,163,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,112,231,1)), color-stop(47%,rgba(200,94,199,1)), color-stop(100%,rgba(168,73,163,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e570e7', endColorstr='#a849a3',GradientType=0 ); /* IE6-8 */

border-color: #CC33CC;
}



I decided to take out
.meira a:link, .meira a.visited, .meira a:hover, meira a:active
{
display:block;
}


since it didn't work btw c:

Does posting this help at all? :P
Was This Post Helpful? 0
  • +
  • -

#14 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 12:47 PM

<!DOCTYPE html>

<html>
<head>
    <title>Page Title</title>

<style type="text/css">
.meira
{
	display: inline-block;
	padding: 2px;
	font-size:0.8em;
	font-style:italic;
	border: 2px solid #6699FF;
	border-radius: 5px;
	-moz-border-radius:5px;
	-webkit-border-radius: 5px;
	margin-bottom: -30px;
	margin-top: -10px;
	
	background: rgb(73,192,240); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ5YzBmMCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyY2FmZTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, rgba(73,192,240,1) 0%, rgba(44,175,227,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(73,192,240,1)), color-stop(100%,rgba(44,175,227,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(73,192,240,1) 0%,rgba(44,175,227,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#49c0f0', endColorstr='#2cafe3',GradientType=0 ); /* IE6-8 */
	
	
}

.meira a
{
    display: block;
    line-height: 20px;
	font-family: Verdana, Sans-serif;
	font-weight: bold;
	text-decoration: none;
	color:white;
}

.meira a:hover
{
	padding: 5px;
	display:block;
	background: rgb(229,112,231); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1NzBlNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQ3JSIgc3RvcC1jb2xvcj0iI2M4NWVjNyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhODQ5YTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);

background: -moz-linear-gradient(top, rgba(229,112,231,1) 0%, rgba(200,94,199,1) 47%, rgba(168,73,163,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,112,231,1)), color-stop(47%,rgba(200,94,199,1)), color-stop(100%,rgba(168,73,163,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(229,112,231,1) 0%,rgba(200,94,199,1) 47%,rgba(168,73,163,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e570e7', endColorstr='#a849a3',GradientType=0 ); /* IE6-8 */

border-color: #CC33CC;
}

</style>
</head>

<body>

<div class = "meira"><a href = "http://www.google.com" target="_blank"
                        title = "Viltu ekki lesa restina?">Lesa meira >></a>
</div>

</body>
</html>


Was This Post Helpful? 0
  • +
  • -

#15 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Using "a:visited" isn't working.

Posted 20 December 2012 - 12:57 PM

I think block should be inline-block throughout - only the container element might need block. That is, if it extends across the width of the page.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2