I'm creating an HTML Help file (yeah, yeah, I know it's old fashioned but Microsoft has yet to provide a newer replacement).
When I open the file in a normal browser, the text appears how I expect. But when I open the file in the HTML help viewer, the first line within each <dd>
element is indented, which I don't want.
Here's my CSS file.
body
{
color: #111;
font-family: Arial, Helvetica, Sans-Serif;
font-size: 12px;
}
dt {
font-weight: bold;
margin-top: 8px;
margin-bottom: 8px;
}
dd {
margin-left: 18px;
}
pre {
color: blue;
}
And here's part of my HTML.
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" Content="text/html; charset=Windows-1252">
<title>CYGNUSSTATEINFO Structure</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>
<h1>CYGNUSSTATEINFO Structure</h1>
<p>
The CYGNUSSTATEINFO structure contains information about the current state and settings of the Cygnus application. This information may be useful for programming extensions that need more information about the data being processed. This structure contains the following members.
</p>
<dt>HWND hCygnusWnd</dt>
<dd>
A handle to the main Cygnus window.
</dd>
<dt>LPWSTR lpszCurrFile</dt>
<dd>
A Unicode string that specifies the name of the current file being edited. Note that this member is for display purposes only and does not contain a fully qualified path.
</dd>
<dt>int nStartOffset</dt>
<dd>
Specifies the offset of the start of any selection. This may be useful when it is necessary to know the offset of the data being processed. This member is zero if there is no selection associated with the current task.
</dd>
<dt>int nBytesPerRow</dt>
<dd>
Specifies the current number of bytes per row.
</dd>
<dt>int nOffsetRadix</dt>
<dd>
Specifies the current offset radix. This is the notation used to show the offset of each row. It will be 16 for hexadecimal, 10 for decimal.
</dd>
<dt>int nGroupBy</dt>
<dd>
Specifies the number of bytes per group in the hex portion of the display. This value is one if there is no byte grouping.
</dd>
<!-- Etc.... -->
</body>
</html>
Can anyone understand why the first line is being indented here? I've tried setting text-indent: 0
with no success. I also tried changing the DOCTYPE to <!doctype html>
, but nothing changes this.
Add the following statement to the <head>
section of all your HTML files.
This works if the HTML topic files are encapsulated in a .chm help file.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"/>
e.g.:
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" Content="text/html; charset=Windows-1252">
<title>CYGNUSSTATEINFO Structure</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"/>
</head>
For further information have a look at our FAR HTML knownledge base CSS3 in FAR Browser
and Rick Strahl's Web log Make your CHM Help Files show HTML5 and CSS3 Content