html.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Aug 2015 23:55:34 +0300
changeset 1729 22ffd80639c0
parent 1697 f41d35f4af39
child 1905 fba288d59662
permissions -rw-r--r--
Make centered content design with adoption for mobile devices. Highlight TOC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1119
diff changeset
     1
.. -*- coding: utf-8; -*-
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1119
diff changeset
     2
.. include:: HEADER.rst
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
=======
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 HTML.
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
=======
1346
a2fbf50a43f4 Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
     7
.. contents::
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1119
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
     9
Disable quirk mode.
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
    10
===================
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
    11
::
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
    12
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
    13
  <!DOCTYPE HTML>
fd5d841f7273 Disable quirk mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1118
diff changeset
    14
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
Page encoding.
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
==============
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
Place in HEAD tag (CHARSET is one among of defined by
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
http://www.iana.org/assignments/character-sets)::
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
  <meta http-equiv="Content-Type" content="text/html; charset=CHARSET">
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
1529
7c71d0195be0 Page encoding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1368
diff changeset
    23
or in HTML 5::
7c71d0195be0 Page encoding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1368
diff changeset
    24
1697
f41d35f4af39 Remove trailing spaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1529
diff changeset
    25
  <meta charset="utf-8">
1529
7c71d0195be0 Page encoding.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1368
diff changeset
    26
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
See:
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
  http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
Center an object.
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
=================
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
1368
d8c21f2ef14c Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1346
diff changeset
    34
To center block-level element::
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
1118
148d4e3855e2 position: relative; width: 700px;
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1047
diff changeset
    36
  <div style="margin-left: auto; margin-right: auto; position: relative; width: 700px;">
1040
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
    <div>SOME</div>
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
  </div>
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
To center inline element::
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
  <p style="text-align: center;">TEXT</p>
f7d65dea956d Center an object.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
1047
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    44
Browser support.
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    45
================
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    46
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    47
  * http://htmlbook.ru/
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    48
  * http://www.quirksmode.org/
1c0dffa7aafd Browser support.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1040
diff changeset
    49