I have a website with a rather complicated input form, which can vary a lot (it has different fields depending on what the user has entered until now). When I was making the CSS, I noticed that there is a div which will not render when it's empty, and due to the complicated structure, break all the other divs around it - but it is legal for it to be empty. In fact, it not only needs to have content, but also to have at least enough content to be as high as the neighboring div for the design to align properly.
The hack I came up with was to use a css::after
pseudo-element, and stuff it with several paragraphs of content. I gave the text an invisible color, rgba(0, 0, 0, 0)
, so it won't appear to the user. I know this is an ugly hack, but I'm not good at CSS (we have no professional designer), the site is really complicated, and the project is already late.
Now I read somewhere that search engines think that this is a trick to add more keywords to a website, and penalize invisible text severely. Is this always true? Will this thing trip me up? Do they ever notice text which is added in a CSS::after
element instead in the normal markup?
This is only there on the input form, which Google doesn't have to index. But I wonder if it will penalize the whole site if it ever gets on it?
I am just using a few paragraphs of pure Lorem Ipsum. No links in it, no keywords, nothing. It is only there for the alignment.