Solved

Simple CSS problem

Posted on 2013-01-08
5
199 Views
Last Modified: 2013-01-08
I have this page:

http://goo.gl/hf5MP

There is a div class of "callout" - see the text "Brand lifts in action"

I have set .callout p {} to this:
/* Line 2024 */
.callout p
{
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 5px;
  padding-left: 0px;
  font-size: 90%;
}

However, it is using one of these styles instead - there is a large gap underneath the text "learn more" which leads me to believe it is using the padding from one of the below styles. How can I avoid this?

/* Line 89 */
p
{
  font-size: 16px;
  padding-bottom: 10px;
}

/* Line 1965 */
#container p
{
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 20px;
  padding-left: 0px;
}
0
Comment
Question by:lvollmer
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38756422
/* Line 89 */
p
{
  font-size: 16px;
  padding-bottom: 10px;
}

will hit every P tag.   Just set your

/* Line 2024 */
.callout p
{
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 5px;
  padding-left: 0px;
  font-size: 90%;

  font-size: ??px;
  padding-bottom: ??px;
}
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38756435
#container p is more specific than .callout p

id has priority over class to get around it you need an id on the specific p that you want to target.  Or you can try using !important on the class properties which will override the id declaration but probably screw up some thing else.

Cd&
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 38756442
0
 

Author Closing Comment

by:lvollmer
ID: 38756449
Jackpot, thanks!!
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38756582
That was a great article! Thanks.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question