SEO-Friendly CSS Hiding. Which Method is Yours?

Sometimes popular and fashionable causes minor difficulties to the fashion victim. It’s like buying bass weejuns tassel loafers not being sure whether they fit you or not, the only reason is YOU NEED THEM!

By the way, here they are.

Same thing happened to some owners of responsive websites. They want their site to be viewed from every possible device, even though they don’t have a clue how to make it right.

There exist dozens of techniques that turn any website into responsive, but as a rule we forget about one weighty argument which is Google. These guys are **** monopolists who use sophisticated algorithms to maintain their online supremacy.

How Organic Turned into Paid

Most people believe that when they type "cheap clothes online" or "potholders" into Google, they receive a list of the most relevant sites. Doh...Not true. That's how Google used to work. Now, when someone searches for these items, the most prominent results are displayed because companies paid Google for that privilege.

Keeping their hands on the throat of most brands Google simply controls them and their money flow. But that’s not the point of the story... While laying its hands on every possible thing Google decides whether to penalize you for certain things that you may find appropriate while handling your website. Even your CSS is at Google’s gunpoint.

What Do SEO & CSS Have in Common?

From time to time there appears the necessity to hide some content blocks when managing the mobile layout in your responsive website. Removing them is definitely not an option. So, what to do?

Here are five options to consider...

1
2
3
4
5
#content {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

or

1
2
3
4
5
6
hideme {
position: absolute;
overflow: hidden;
top: -100%;
left: -100%;
}

or

1
2
3
4
.structural {
position:absolute;
left:-9999px;
}

or

1
div.my{opacity:0;}

or

1
document.getElementById("my").style.display = "none"

or whatever else...

...it turns out that you can be penalized by Google. This method will work if you need to hide a menu item, but if you hide a div full of h1 and anchors Google may blacklist list you.

But if you are so anxious about your SEO you may to use javascript:

Some code like this will work for you:

1
2
3
4
5
$(document).ready(function() {
 $('.i').addClass('img')
   .wrapInner('<span />');
 $('.i span').css({'position': 'absolute', 'left': '-10000px'});
});

***

Anyway don’t forget that Google’s bots index hidden divs in css. So you’d better use relevant content either someday you’ll get an email from Panda, yeah that one Panda... that’s why for the sake of your website usability be careful.

SPEAK UP!

Ok, what about you? Which techniques are you using on your website? You're welcome to share them in the comments.


Alex Bulat

Writing a blog post or building a micro niche WordPress website is something Alex can do bare-handed. You're welcome to contact him via Telegram, Facebook, or LinkedIn.

Get more to your email

Subscribe to our newsletter and access exclusive content and offers available only to MonsterPost subscribers.

From was successfully send!
Server error. Please, try again later.

Leave a Reply