mozilla

Compare Revisions

top

Change Revisions

Revision 20258:

Revision 20258 by Nicephotog on

Revision 20259:

Revision 20259 by Nicephotog on

Title:
top
top
Slug:
CSS/top
CSS/top
Tags:
css, "CSS Reference"
css, "CSS Reference"
Content:

Revision 20258
Revision 20259
nn32      <p />
tt34    <pre>
35&lt;?xml version="1.0" encoding="utf-8"?&gt;
36&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
37&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang=
 >"en"&gt;
38&lt;head&gt;
39&lt;meta http-equiv="Content-Type" content="application/xhtml+xml
 >" /&gt;
40&lt;title&gt;Mozzila.org height top left width percentage CSS&lt;
 >/title&gt;
41 
42&lt;style type="text/css"&gt;
43/* The body could be set using px unit also for the div to operat
 >e */
44body{
45width: 100%;
46height: 100%;
47}
48/* The div can now operate the settings with % unit (body w and h
 > are set) */
49div{
50position:absolute;
51left:15%;
52top:30%;
53bottom:30%;
54width:70%;
55height:40%;
56text-align:left;
57border: 3px rgb(0,0,0) solid;
58}
59&lt;/style&gt;
60 
61&lt;/head&gt;
62&lt;body&gt;
63 
64&lt;center&gt;
65 
66&lt;div&gt;
67...Some content...
68&lt;/div&gt;
69 
70&lt;/center&gt;
71 
72&lt;/body&gt;
73&lt;/html&gt;
74</pre>

Back to History