Inline Code Example HereI have this url http://lawnkinglandscapedesigns.com/ I edited the CSS inside wordpress to center the logo, and now .slide .banner { display: none; } is showing up on the website. This is what I put into the code:

#logo {
margin-left: 125px !important;
}
.slide .banner {
display: none !important;
}

Even when I delete the code it still shows up. Any ideas on how to get rid of it?

Dani AI

Generated

A literal CSS rule printed on the page means it was inserted where the browser treats it as text — a widget, theme option or post content — rather than inside a style context. is correct that the browser will render raw CSS as page text if not placed properly, and is right to suggest removing the stray text. If the rule still appears after you think you deleted it, the cause is usually one of: editing the wrong place (child vs parent theme), a different storage location (widget, plugin or DB option), or caching holding an old copy.

Quick steps to find and remove it:

  • Use your browser’s inspector (right‑click the visible rule → Inspect). Note the surrounding element and any id/class so you know whether it’s coming from header, footer, a widget area, or page content.
  • Check Appearance → Widgets for Text widgets, Appearance → Customize → Additional CSS, your theme’s options panel, and any plugins that add header/footer or custom CSS.
  • If the inspector shows it inside header/footer template markup, edit the header/footer file in your child theme (or via FTP) rather than relying only on the admin editor.

If you have file or DB access, search the code and database for the exact text you see. Replace the placeholder with the literal text you see on the page:

grep -R "text-you-see-on-page" -n /path/to/wordpress
SELECT option_name FROM wp_options WHERE option_value LIKE '%text-you-see-on-page%';

Also clear every cache (WP cache plugin, server cache, CDN like Cloudflare, and browser cache) after making changes. Backup files and the DB before editing theme files. To fix permanently, move the CSS into the proper place (Customizer → Additional CSS, a child theme stylesheet, or a dedicated custom‑CSS plugin) so it’s applied but not printed as page text.

Recommended Answers

All 2 Replies

You have it randomly written down in your code where it doesn't make sense... delete it and you should be fine.

Open the file, search for ".banner" and delete the relevant text...

For future reference, CSS added to the page needs to be inside <style></style> tags in the head element or inside elements on the actual page (e.g. inside <div> or <span>, etc).
Simply typing it in as text will make the browser render it on the page. It doesn't know any better.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.