• I was wondering if there was a way to block a post entry or page from using the css file to format, and instead use whatever html/css is actually in the post.

    Thanks
    Scott

Viewing 3 replies - 1 through 3 (of 3 total)
  • The way CSS works is any CSS applied inline in the post or page will automatically override any CSS applied to that same page element in the stylesheet, because the inline styling is closer to the source than the stylesheet styling, and whatever is closest to source overrides anything that is farther away.

    You won’t want to turn off all the CSS on your site to display a specially formatted post because that will turn off styling for the site header, background, footer, nav, which will be difficult to replace within a post.

    Thread Starter rawlimit

    (@rawlimit)

    Is there a way or plugin, that will use the HTML of the post instead of the style sheet? When I use the visual editor to edit the post content, it looks perfect. When I save and view the actual page it overrides the html code with the page’s css formating…

    What you are seeing is exactly how WordPress is designed to work. The editor is to enter content, not to style it.

    Content entered in the editor is then styled by the theme. And each theme styles that same content differently.

    CSS does allows override of stylesheets on a line by line basis but you have to enter each override separately. That completely defeats the purpose of using a stylesheet in the first place.

    There is code that lets you add a “CSS for this Post box” on the editor page. But you still have to enter that styling as CSS in the CSS per post box, not in the editor.

    What you want to do is basically how HTML worked around 1999, with <font> tags that specified styling right in the code. Its been a 12 year struggle to get away from just what you want to do…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing CSS from a Post Entry or Page’ is closed to new replies.