Forum Moderators: open
In your boilerplate CSS, always include three things for all headers: text-align, font-weight and font-style. All three will otherwise be handled by browser defaults-- which might change next year as fashions change, or if one browser decides to be different.
/* these are my changes or additions */
p {blahblah...}
h1 {blahblah...}
/* now back to default styles */
p.myclass {font-family: sans-serif; text-align: left; margin-top: .5em; margin-bottom: 0em;}
...
<p class = "myclass">blahblah</p>
<p style = "font-family: sans-serif; text-align: left; margin-top: .5em; margin-bottom: 0em;">blahblah</p>
The answers to some of these questions probably seem pretty obvious to you
If you are less lucky, there will be an outside stylesheet whose address you will have to enter manually.
Can you tell me how I would determine the address of an outside (I think that this is the same as external) stylesheet?
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
html {
font-size: 14px;
}
body {
background-color: #fff;
color: #036;
padding: 0 1em 0 0;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
}
But, again, ask yourself whether it's necessary to declare a font size at all. Does your page layout require a particular size?
Are your wishes more important than the user's preferences?
I think that I would have to create definitions for my h1 tag, h2 tag, paragraph tag, etc. It is not a matter of changing some of the specifications for these tags, and I think that this is one of the things that I would like to have a better understanding of.
At the moment, if I create an h1 tag, for instance, and use a percentage (e.g. 125%) for the font-size, would the base value be the font-size mentioned in the CSS stylesheet for the heading box, which I believe is 16px, and would the text that I type be 125% larger than 16px?
Or is the default size for the h1 tag and other elements determined by the browser? If I know which one is used, then I can decide what percentage to use for the font-size.
For paragraphs, should I use inline CSS and specify that I want my paragraphs to be font-family Arial and font-size 13pt, or should I indicate font-family Arial and font-size 125% (or another percentage if that’s what makes the font-size 13pt) and the size of the text will be based on some default size (Would the default size be that which is set by the browser or the body text box in my template?)? Would both options resize if someone (1) zooms in on the whole page and (2) zooms in on the text only?
the text (font size 3 [using html at the moment], but have seen this same thing happen on websites using CSS for font-size) on the pages of the site that I am working on appears smaller when I look at it on the site than when I copy and paste it into Microsoft word? Can you please tell me why this is occurring? I want the text size on the website to be the same size as it appears on Microsoft Word.
Can you change the "16px" setting? It's an odd size for a sans-serif font; it makes the whole box look a little bigger and more emphatic than ordinary type. Is that the intention of this area? It seems redundant if you're also going to put in a heading.
Font-family and font-size can both be applied to divs. So if it is genuinely impossible for you to use a stylesheet, then you can wrap all your paragraphs in a single div.
But, again, think carefully about whether you want to force a size or font-family for the body text. Does your template say anything about size of body text? Can you change it? If it has to say something, you can say "font-size: inherit" and it will be just as if you didn't mention a size at all.
Microsoft Word is a word processor. Are you talking about an HTML Preview function?
Please don't use the HTML <font> property at all, for any reason. It is heavily deprecated and there are always alternatives. This goes double for values like "size='3'" or "large" where the exact proportion is up to the browser. If you use percentages, the proportions will be almost identical everywhere. Sometimes there will be tiny hiccups based on the user's physical setup, but these are most noticeable at very small sizes.