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..

    MaterializeCSS - Mobile Collapse menu not showing when clicked

    How to get only the last ul of specific id on page via CSS :last-child property?

    How to override the slide effect to dissolve effect in JQuery Mobile using CSS3 feautures?

    JS/CSS. How do I force a child div to the bottom of it's parent div

    How to fix sizes when I developed my website with 'more space' display setting on macbook retina

    How to display a list in two rows?

    CSS stylesheets at top or bottom? or How to solve blank page issue?

    How to make colspan work without affecting width of the other rows

    How do you programmatically apply a css class to an asp.net control?

    How to make text input line up with button in IE7?

    How can I vertically center this css/javascript based modal dialog?

    How to make my div align in CSS?

    how to cope with text to element alignment issues

    How to make a div box with display:flex clickable like display:block?

    How do I lay out my content divs in a similar manner to Facebook Timeline?

    How to overlay two fonts with css

    How to Make a Fluid Layout

    How to view browser's calculated CSS specificity?

    How to apply this sidebar to all pages using CSS?

    How can I slide the sidebar out of view and make the content flexbox resize to fill the void?

    how do i place text opposite to Anchor Tag Using CSS [closed]

    How can I make responsive image take up 100% of its parent's height?

    How to make cross-browser compatibility with IE10 and IE11?

    how can i center the text inside my css div circle

    How can I get jQuery or Javascript to change css based on the current url?

    How to keep a sticky menu contained inside a floating sidebar?

    How to arrange/align two paragraphs into boxes [duplicate]

    How to change active link color in bootstrap css?

    How can I make a full width videojs v5 progress bar?

    How to make CSS columns in a div?