- This topic is empty.
-
AuthorPosts
-
September 10, 2011 at 10:21 am #34299pbrecursionMember
I have the font-family and font-size set identically for my p, dl, dt, and dd elements; however, the description list elements show up in ie, moz, and webkit browsers with a different font-size. If I use a font-size less than 1em, the dl elements are smaller than the ‘p’ elements. If I use a font-size greater than 1em, the dl elements are larger than the ‘p’ elements.
Why? What do i need to do to make them all the same look and feel?
Here is sample code to demonstrate the issue. First, the CSS:
@charset "utf-8";
/* CSS Document */
body, h1, p, dl, dd, dt {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
}
body {
font-family:Arial, sans-serif;
background-color:#000;
line-height:1;
}
#page {
margin:0 auto;
background-color:#fff;
padding:0;
width:960px; /*page width = 960px*/
}
.content {
padding:20px;
display:block;
}
h1 {
font-weight:bold;
font-size:1.6em;
font-variant:small-caps;
padding-top:1em;
margin-bottom:.5em;
}
p, dl, dt, dd {
font-size:.8em;
font-weight:normal;
font-style:normal;
font-variant:normal;
}
dl.summary dt {
font-weight: bold;
color:#0067AA;
margin-bottom:.1em;
line-height:1.4em;
font-size:1.3em;
}
dl.summary dd {
padding:0 .5em;
margin-bottom:.4em;
line-height:1.2em;
}
dl.authors dt {
font-weight:bold;
padding-left:.5em;
}
dl.authors dd {
padding-left:2em;
}
dl.pub-date dt {
font-weight:bold;
padding-left:.5em;
}
dl.pub-date dd {
padding-left:2em;
}
and now the associated HTML:
Font Comparison between 'p' elements and 'dl' elements
List of White Papers
This is a test on formatting using dl-dt-dd markup.
It appears to me that even though the font-size and font-family are defined the same for 'p' elements and 'dl', 'dt', 'dd' elements, the font size, spacing, ... something, looks different. Or maybe because I'm ancient, my eyes are failing. What do you think?
- Title of paper
- This is a multi-line summary of the whitepaper. It may be the abstract, or if there is no abstract within the contents of the paper, it is a brief summary of the paper, describing what the paper contains, such as the objectives of the paper, what the paper covers, but not necessarily outlining the findings of the paper or recommendations. That's what makes this different than an executive summary.
- Authors
- Name, title, company
- Name, title, company
- Date
- Monthy, year
Thanks in advance for any help.
September 10, 2011 at 2:31 pm #86890pbrecursionMemberAgain, you have been a great help! I should have been able to figure it out on my own, but I’m glad you knew the answer.
Thanks for sharing your expertise – I really appreciate it!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.