Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
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, 4665👍, 0💬
Popular Posts:
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
What are unadjusted function points and how is it calculated? Unadjusted function points = ILF + EIF...
How To Process Query Result in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL You can run queries...
How Many Tags Are Defined in HTML 4.01? There are 77 tags defined in HTML 4.01: a abbr acronym addre...
How can I include comments in HTML? An HTML comment begins with "<!--", ends with "-->...