Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Center Your Page in Browser Windows
How To Center Your Page in Browser Windows? - CSS Tutorials - Page Layout and Background Image Design
✍: FYIcenter.com
In the previous exercise, the page width is fixed, but the page is not centered. If you want to center your page in the browser window, you can add the CENTER tag before the DIV tag. The following tutorial exercise shows you how to use CSS definitions to center your page, set background color, and set page margins:
<html><head> <style type="text/css"> BODY {background-color: gray} DIV.page {background-color: white; width: 6.0in; padding: 0.25in; text-align: left} </style> </head><body><center><div class="page"> <H1>Centered Page with Fixed Width</H1> <p><script language="JavaScript"> for (i=0; i<100; i++) { for (j=0; j<10; j++) { document.write(j+' '); } } </script></p> <p align="right">By FYICenter.com</p> </div></center></body></html>
If you save the document as centeredPageLayout.html and view it,
you will see a page like this:
2007-05-11, 4631👍, 0💬
Popular Posts:
How can I use tables to structure forms Small forms are sometimes placed within a TD element within ...
what are the advantages of hosting WCF Services in IIS as compared to self hosting? There are two ma...
What is SMC approach of estimation?
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
How can we implement singleton pattern in .NET? Singleton pattern mainly focuses on having one and o...