/    Sign up×
Community /Pin to ProfileBookmark

P Margin not being recognised

I have a div that has the p margin set for it….like so…

#col2 {
float:left;
width:80%;
position:relative;
left:50%;
overflow:hidden;

}
#col2 p {
margin:10px;
}

All paragraphs in this div will have a margin of 10 pixels.

However, I also have a table within this div. The paragraphs in this table need to have different margin settings. So I set up a class for the table in question…

.table {
display:table;
border:1px solid blue;
margin:auto;
}

.table p {
margin:3px;
}

Unfortunately the col2 p is overruling table p…so the paragraphs inside the table are giving me margins of 10 pixels. Is it possible to set a different p value for the information in the table?

Thanks

Riz

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 07.2009 — #col2 .table p {
margin:3px;
}
Copy linkTweet thisAlerts:
@riz-manauthorMar 07.2009 — Fang...as always...you're the man!
×

Success!

Help @riz-man spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...