Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 396381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:32:48+00:00 2026-05-12T16:32:48+00:00

I have a css file that defines style for all <p> tags. like this

  • 0

I have a css file that defines style for all <p> tags.

like this

 p { ......... }

How can I write a <p> in a page where the stylesheet is included that has default styling?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:32:49+00:00Added an answer on May 12, 2026 at 4:32 pm

    There’s no easy way to do this.

    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.

    Method 1 (for simple overrides):

    Add an extra class definition in the statement similar to the one where you clear the default styling (such as is discussed at http://www.wordpress.darfuria.com/blog/clear-css-defaults). You might have to arrange the declarations carefully to prevent the ‘normal’ style from taking precedence.

    .override {/*Your default style overrides, color: white;
     margin: 0; background:none; etc */}
    
    
    <p class="override">foo</p>
    

    Method 2 (clunky, but good for complex regions):

    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.

    Method 3 (good for one-shot overrides):

    Use inline styles, as others have described here.

    Edit:
    Not Really a Method, But Probably The Most Correct Way

    Also probably not what you want to hear

    Re-think your how you’ve arranged your classes.

    For example:

    If the overridden <p> is special in some way, it probably deserves it’s own class that describes what it’s purpose is. <p class='override'> 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.

    Are the overrides coming in a specific region? If so, them a style definition like div.left_nav p {/*styles*/} might be a better fit.

    Lastly, Is your default <p> styling not really default? Maybe a more loosely specified p style might be in order, with additional p.foo and p.bar definitions later on.

    This doesn’t fix your immediate problem, but it might be worth chewing on before you start your next project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page (page1.html) which references a css file (style1.css) All is good.
I have a CSS like this ul { list-style-image:url(images/bulletArrow.gif); } ul li { background:
I have the following style in an external CSS file called first.css table {
Are .css files always needed? Or may I have a .css basic file and
In firefox, I have the following fragment in my .css file tree (negative){ font-size:
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
It is advisable to use tables in HTML pages (now that we have CSS)?
If I have a HTML page that links to two stylesheets that are invoked
I have a CSS class called grid which I place on my tables. I
Is it possible to have a CSS rule which basically undoes a prior rule?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.