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 8360377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:27:00+00:00 2026-06-09T11:27:00+00:00

<html> <head> <style type=text/css> #sidebar p { font-family: Verdana; font-size: .9em; } #sidebar .intro

  • 0
<html>
  <head>
    <style type="text/css">
    #sidebar p {
        font-family: Verdana;
        font-size: .9em; }

        #sidebar .intro {
            font-family: Georgia;
            font-size: 1.25em;
            color:red;
            }

    </style>

  </head>
  <body>
    <div id=”sidebar”>
       <p class=”intro”>
           As you can see, the more CSS styles you create, the greater the potential for formatting
          snafus. For example, you may create a class style specifying a particular
         font and font size, but when you apply the style to a paragraph, nothing happens!
          This kind of problem is usually related to the cascade. Even though you may think
         that directly applying a class to a tag should apply the class’s formatting properties,
          it may not if there’s a style with greater specificity.

        You have a couple of options for dealing with this kind of problem. First, you can
        use !important (as described in the box above) to make sure a property always
        applies. The !important approach is a bit heavy handed, though, since it’s hard to
        predict that you’ll never, ever, want to overrule an !important property someday.
        Read on for two other cascade-tweaking solutions.
    </p>    
</div>

  </body>
</html>

the #sidebar p style has a specificity of 101 (100 for the ID, and 1 for the tag
selector), while the .intro style has a specificity of 10 (10 points for a class selector). Since 101 is greater than 10, #sidebar p takes precedence. Changing .intro to #sidebar .intro changes its specificity to 110.

Even though I have change this my result is not coming

Can anyone explain me.

output: should be in red color, font-size-1.25em and font-family -Georgia

  • 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-06-09T11:27:01+00:00Added an answer on June 9, 2026 at 11:27 am

    The quotes around the ID sidebar and classname intro are invalid.
    ”sidebar” should be "sidebar".

    The browser interprets the ID as ”sidebar” and not sidebar, therefore, none of your rules even match.

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

Sidebar

Related Questions

Here is my code <!DOCTYPE HTML> <html> <head> <style type ='text/css'> * { font-family:Arial,
html <html> <head> <style type="text/css"> body { background-color: transparent; color: white; } </style> </head>
I have some HTML Code: <html> <head> <title>css test</title> <style type=text/css> .box{width:100%;float:left;background:red} </style> </head>
<html><head><style type=text/css> #foo { color: blue; } a.bar { color: red; } #foo .baz
<html> <head> <style type=text/css rel=stylesheet> * {margin:0;padding:0;} div#box {background-color:green;width:1000px;} /* #box {position:absolute;top:0;right:0;} */ /*
<html> <head> <link type=text/css rel=stylesheet `href=file:///C:/Users/Documents/style.css /> <script type=text/javascript src=file:///C:/Users/Documents/jquery-`1.7.1.js></script> <script type=text/javascript `src=file:///C:/Users/Documents/jquery.tablesorter.js></script> <script
<html><head> <link type=text/css rel=stylesheet href=file:///C:/Users/Documents/style.css /> <script type=text/javascript src=file:///C:/Users/Documents/jquery-1.7.1.js></script> <script type=text/javascript src=file:///C:/Users/Documents/jquery.tablesorter.js></script> <script type=text/javascript>
In the code below: <html> <head> <style type=text/css> ul { list-style-type:none; margin:0; padding:0; }
Here is a complete test case: <!DOCTYPE html> <html> <head> <title>test</title> <style type=text/css> html,
I have a list like this: <html> <head> <link type=text/css rel=stylesheet href=testli.css> </head> <body>

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.