Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's no easy way to do this. </p> <p>There a some common tricks to simulate that behavior though. The best one to use would vary based on how complex the overridden region is, and how often you want to do this.</p> <p><strong>Method 1 (for simple overrides):</strong></p> <p>Add an extra class definition in the statement similar to the one where you clear the default styling (such as is discussed at <a href="http://www.wordpress.darfuria.com/blog/clear-css-defaults" rel="noreferrer">http://www.wordpress.darfuria.com/blog/clear-css-defaults</a>). You might have to arrange the declarations carefully to prevent the 'normal' style from taking precedence.</p> <pre><code>.override {/*Your default style overrides, color: white; margin: 0; background:none; etc */} &lt;p class="override"&gt;foo&lt;/p&gt; </code></pre> <p><strong>Method 2 (clunky, but good for complex regions):</strong></p> <p>Use an iframe to pull the whole region from a separate .html file hosted elsewhere on your site. The content inside iframes respects the CSS of the page inside the frame, and generally ignores the CSS from the surrounding page.</p> <p><strong>Method 3 (good for one-shot overrides):</strong></p> <p>Use inline styles, as others have described here.</p> <p>Edit: <strong>Not Really a Method, But Probably The Most Correct Way</strong></p> <p><em>Also probably not what you want to hear</em></p> <p>Re-think your how you've arranged your classes. </p> <p>For example:</p> <p>If the overridden <code>&lt;p&gt;</code> is special in some way, it probably deserves it's own class that describes what it's purpose is. <code>&lt;p class='override'&gt;</code> doesn't help people who will be looking at your design after you're done, since it doesn't tell them what the overridden text is for or why it's styled that way.</p> <p>Are the overrides coming in a specific region? If so, them a style definition like <code>div.left_nav p {/*styles*/}</code> might be a better fit. </p> <p>Lastly, Is your default <code>&lt;p&gt;</code> styling not <em>really</em> default? Maybe a more loosely specified p style might be in order, with additional <code>p.foo</code> and <code>p.bar</code> definitions later on.</p> <p>This doesn't fix your immediate problem, but it might be worth chewing on before you start your next project.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload