Note that there are some explanatory texts on larger screens.

plurals
  1. POvisited image link pseudo class does not work in Chrome
    primarykey
    data
    text
    <p>I've encountered a weird behaviour in chrome. a:visited overrides a:visited img and I have no idea why. I've checked in developer tools and it states clearly that it's the a:visited and not any other style or classes. I wonder what's causing this behaviour for me in chrome. Here is my css for the links and image links:</p> <pre><code>a { color:#046DAD; text-decoration:none; } a:visited { color:#304198; } a:hover { color:#39F; text-decoration:underline; } a:active { color:#ecc31b; } a img { border:1px solid #c1c1c1; } a:visited img { border:0px solid #c1c1c1; text-decoration:none; color:#c1c1c1; } a:hover img { border:1px solid #39f; text-decoration:none; color:#39f; } a:active img { border:1px solid #fbcb09; text-decoration:none; color:#fbcb09; } </code></pre> <p>The HTML structure:</p> <pre><code>&lt;div class="content"&gt; &lt;a href="x.html"&gt;&lt;img src="x.jpg" alt=""/&gt;&lt;/a&gt; &lt;/div&gt; </code></pre> <p>The a:visited color still overrides it if I change it to</p> <pre><code>.content a img { border:1px solid #c1c1c1; } .content a:visited img { border:0px solid #c1c1c1; text-decoration:none; color:#c1c1c1; } .content a:hover img { border:1px solid #39f; text-decoration:none; color:#39f; } .content a:active img { border:1px solid #fbcb09; text-decoration:none; color:#fbcb09; } </code></pre> <p>Have you guys encountered anything similar?</p> <p>Edit:</p> <pre><code>&lt;div class="content"&gt; &lt;a href="x.html" class="contentimage"&gt;&lt;img src="x.jpg" alt=""/&gt;&lt;/a&gt; &lt;/div&gt; a:visited.contentimage { text-decoration:none; color:#c1c1c1; } </code></pre> <p>So I tried using the code above as a workaround to override the style of each image link. That's the only way I solved it. Any ideas on easier workarounds?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload