WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
Bug Report: Custom Link Colour - garbage in HTML (3 posts)

  1. J.Smith
    Member
    Posted 2 years ago #

    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='http://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

    http://wordpress.org/extend/themes/twentyeleven/

  2. JPS66
    Member
    Posted 1 year ago #

    Great tip! I was just trying to figure out what was overriding my hover style. Thanks.

  3. J.Smith
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic