?
Solved

Simple CSS problem

Posted on 2013-01-08
5
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 53

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 2000 total points
ID: 38756442
0
 

Author Closing Comment

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

Expert Comment

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

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to count occurrences of each item in an array.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

762 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