• Hello,

    I was stuck for a couple of days trying to figure out where the garbage in HTML is coming from:

    <link rel='canonical' href='https://mysite.com/' />
    	<style>
    		/* Link color */
    		a,
    		#site-title a:focus,
    		#site-title a:hover,
    		#site-title a:active,
    		.entry-title a:hover,
    		.entry-title a:focus,
    		.entry-title a:active,
    		.widget_twentyeleven_ephemera .comments-link a:hover,
    		section.recent-posts .other-recent-posts a[rel="bookmark"]:hover,
    		section.recent-posts .other-recent-posts .comments-link a:hover,
    		.format-image footer.entry-meta a:hover,
    		#site-generator a:hover {
    			color: #e53442;
    		}
    		section.recent-posts .other-recent-posts .comments-link a:hover {
    			border-color: #e53442;
    		}
    		article.feature-image.small .entry-summary p a:hover,
    		.entry-header .comments-link a:hover,
    		.entry-header .comments-link a:focus,
    		.entry-header .comments-link a:active,
    		.feature-slider a.active {
    			background-color: #e53442;
    		}
    	</style>
    </head>

    <style> is supposed to look as <style type=”text/css”> on valid HTML. So, everything in between <style></style> on the above code is garbage, isn’t it?

    <flame>Oh, well, style definitions are not supposed to show up on HTML, anyways 8o).</flame>

    After many hours of troubleshooting, I’ve realised that resetting Link Colour in Theme Options to the default #1b8be0 removes the garbage from HTML. What a relief!

    I am confident that I am not the only one bumping into this ‘feature’. What others are doing in order to maintain their HTML valid?

    Cheers,
    John Smith

    https://www.ads-software.com/extend/themes/twentyeleven/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Great tip! I was just trying to figure out what was overriding my hover style. Thanks.

    Thread Starter J.Smith

    (@jsmith-1)

    I’ve realised that the garbage css code in HTML was exactly what I wanted my links to look like.

    I’ve added the above css code to style.css in my child theme, and voila! It worked!

    This definitely looks like a bug to me. Not sure if it has been taken care of in WP 3.3.2. No desire to dig throught the code either – sorry about that!

    Best regards,
    John Smith

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Twenty Eleven] Bug Report: Custom Link Colour – garbage in HTML’ is closed to new replies.