How to hide repeated content from search engines with CSS?


Tags: html,css,seo

Problem :

I have a page structure for a website using fixed headers/footers around the main content. To keep things simpler for responsive design, I'm not using margins around the main content, I'm actually repeating the header/footer in the document - one in the fixed position, and once in the dynamic one. This means I don't need to worry about different heights on different devices.

However, I don't want the repeated content showing in search-engine results, so how can I hide it?



Solution :

CSS doesn't hide anything from search engines.

For good practice, you should consider getting back to only one header/footer.

How about duplicating the header and footer with Javascript? You could use the jQuery .clone() method for this purpose.

Most search engine don't execute Javascript for their crawling.


    CSS Howto..

    How do I prevent child affected for transform scale in css3?

    How to open a bootstrap modal when checked a chec-box (when a tick is placed on a check box)

    How to scale canvas and keep its position on screen?

    jQuery-Based Dropdown Shows Gap Outside of Firefox

    How to align both vertically and horizontally in CSS?

    How to center 2 or more divs on the same line? (css)

    How to stop CSS cascading or how to target only 2nd child and not 3rd with CSS

    How to make separating lines/borders in a table disappear with CSS?

    How to move the right div to the right with css

    How to make recessed button in CSS

    How to apply a responsive CSS height to an element using min/max-height and height?

    Track cursor hover position and show hide menu similar to OSX dock / Windows start bar

    How to modify CSS rules without adding style attribute?

    how do I zoom a background image on a div with background-size

    How to exclude specific control from css?

    How to rotate text and position it properly? (CSS, HTML)

    How to change the scroll-bar style in css [duplicate]

    How can you do this in CSS

    Show/hide rows based on class in HTML

    How to keep Fixed position navigation static positioned when resizing window

    How to display last div at top using CSS?

    How to eliminate the overlap border using CSS only

    Best way how to put elements above an tag?

    CSS: How do I make text indent for a label with long text?

    How to put images to the right and text to the left in css

    How to push content div to footer div while keeping background in the picture

    How to set control properties in css?

    How to set up fields position?

    How to make div's inside div responsive

    How to put some divs in a row?