1

I'm trying to do the cleanest code possible. Is it possible to give an article and an aside padding, margins, etc? I can't seem to figure it out. I end up adding a div with a class, and that accepts padding.

http://matthewtbrown.com/jeffandcricketquilt/index2.html

article {
    width:463px;
    float:left;
    padding: 40 20 0 40;
}
aside {
float: left;
}
h1 {
font-family: 'bitterregular';
font-size:16px;
}
p {
font-family: 'bitterregular';
font-size:14px;
}
4

1 回答 1

1

只需一点 CSS,一切皆有可能。

HTML

<article>Article Tag</article>
<aside>Aside Tag</aside>

CSS

article, aside
{
    padding:5px;
    margin:10px;
}

JSFiddle

于 2013-04-27T14:36:20.523 回答