Hi,
I'm trying to generate a generic stylesheet for my projects. I would very much appreciate it if someone could let me know the best practise for defining fonts in a stylesheet.
Surely a <p>, <h1> etc tag should be display:block by default, yet somewhere down the line of my layouts I'm having to stipulate it AND the exact width of the div it is contained within, or else I'm getting display:inline behaviour - the same thing happens with <li>'s - I'm confused about what the definitive answer (if that's ever possible with so many interpretations).
So for example, what would be the correct css for the following:
* {
margin:0em;
padding:0em;
}
body {
margin:0 0 0 0;
padding:0;
background: #000;
font-weight: normal;
font-size: 9pt;
font-family: arial, futura, helvetica ;
}
h1,h2,h3
{
font-weight: normal;
}
p
{
font-weight: normal;
font-size: 1.05em;
line-height: 1.2em;
padding-top: 0.77em;
padding-bottom: 0;
margin-bottom: 0;
}
#right-content {
float:left;
padding: 15px 0 0 0;
width:600px;
}
#right-content p {
float:left;
width:595px; /* Needed ?? or should it be width:100% ? */
padding:0 0 12px 5px;
}
<div id ="right-content">
<p>What's right, </p>
<p>what's wrong - on a line below, dammit!</p>
</div>
As I posted the code above from my stylesheet, I'm wondering whether * { margin:0em;padding:0em; } is what's causing me problems.
Comments very much appreciated
Tony