| View previous topic :: View next topic |
| Author |
Message |
wid74 General User

Joined: 17 Oct 2003 Posts: 9
|
Posted: Tue Oct 21, 2003 7:34 pm Post subject: Setting Margins |
|
|
I have gone through the motions of setting margins for an HTML document. The preview shows the margins set, but the margins do not appear on the page. Am I missing something?
Here is the HTML code which shows margins set:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0 (Win32)">
<META NAME="CREATED" CONTENT="20031021;20073259">
<META NAME="CHANGED" CONTENT="20031021;20192806">
<STYLE>
<!--
@page { size: 8.5in 11in; margin-left: 1in; margin-right: 1in }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P><BR><BR>
</P>
</BODY>
</HTML> |
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Wed Oct 22, 2003 2:53 am Post subject: |
|
|
there is no such thing as page margins in a html page. A html page displays in the widht of your browser. Sometimes, the width of the page is controlled through the use of a table with fixed width. The tag you see
<!--
@page { size: 8.5in 11in; margin-left: 1in; margin-right: 1in }
-->
is a html comment and is ignored by a browser. It is used by Writer to assing a page layout when you read the file back into Writer. |
|
| Back to top |
|
 |
wid74 General User

Joined: 17 Oct 2003 Posts: 9
|
Posted: Wed Oct 22, 2003 7:06 am Post subject: |
|
|
| Thanks for clearing up my confusion. I looked back on a web page I did a while back & see that I used tables & width settings. |
|
| Back to top |
|
 |
wid74 General User

Joined: 17 Oct 2003 Posts: 9
|
Posted: Wed Oct 22, 2003 12:03 pm Post subject: |
|
|
I did some more looking back at old web pages & found that the following would set margins:
<STYLE>
<!--
P { margin-left: 1.18in; margin-right: 1.38in; color: #000000 }
-->
</STYLE>
I assume the P stands for paragraph.
If I change the P to BODY will I get margins for the document?
Thanks |
|
| Back to top |
|
 |
dpeach OOo Advocate


Joined: 06 Oct 2003 Posts: 397 Location: Mérida, Yucatán, México
|
Posted: Wed Oct 22, 2003 12:46 pm Post subject: |
|
|
Why not try it and see?
I am not completely up on styles, but I know what that one that you have included means. Everytime you start a new <p> section (you can call it paragraph if you want), those are the attributes that will be assigned to all of them on the page. This keeps you from having to define your margin, text color, text size and anything else you want to put in there, each time that you do a <p> tag.
I don't think it works for body. But if you do a <p> tag before each new section, it should define that section with the margins you set.
Without getting too into HTML on this board, you can set up style sheets. This would be a <style> tag that you could link all of your pages to so that you would not have to define this style on each page. The w3c has a great page on how to use styles (sorry, I am too lazy to find it for you).
dpeach |
|
| Back to top |
|
 |
wid74 General User

Joined: 17 Oct 2003 Posts: 9
|
Posted: Wed Oct 22, 2003 1:49 pm Post subject: |
|
|
dpeach thanks - I use style sheets with an editor NoteTab Pro & XHTML 1.0. However, I want to use OOo 1.1 with it's HTML 4.0 Transitional for some things. I don't know yet what CSS is applicable to 4.0 - more homework.
I tried changing the P to BODY, but OOo 1.1 refused to accept it. |
|
| Back to top |
|
 |
dpeach OOo Advocate


Joined: 06 Oct 2003 Posts: 397 Location: Mérida, Yucatán, México
|
Posted: Wed Oct 22, 2003 7:53 pm Post subject: |
|
|
Beyond me.
I looked at styles and found that you should be able to use the BODY to do what you want based on CSS standards (which apparently you knew that). But doing it in OOo is the question. I don't know.
dpeach |
|
| Back to top |
|
 |
|