Username:

Password:

Pages: 1 [2]

Author Topic: Centering web page  (Read 2620 times)

netshet

  • Jr. Member
  • **
  • Karma: +0/-0
  • Posts: 53
Re: Centering web page
« Reply #15 on: August 06, 2011, 01:34:42 AM »
Try encapsulating the entire contents of the page in a global <div>
Code: [Select]
    index.html:
    @@ -26,6 +26,7 @@
    <!-- The structure of this file is exactly the same as 2col_rightNav.html;
          the only difference between the two is the stylesheet they use -->
    <body>
    +<div id="body">
    <div id="masthead">
       <table width="100%" border="0" cellspacing="3" cellpadding="3">
         <tr>
    @@ -114,4 +115,5 @@ Women's Rights, rights, choice, Document
    </div>

    </body>
    +</div>
    </html>
Then moving the size and border style you've applied to the document's entire body, to that new div (and adding a centering style while you're in there :))

lilly1236

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 163
    • WWW
Re: Centering web page
« Reply #16 on: August 11, 2011, 10:41:32 PM »
Firstly create a div in your html code and give it an id, something useful like wrapper (since we want to incapsulate your content inside this div).
Code: [Select]
<html>
<head>

<title>untitled</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />

</head>

<body>

   <div id="wrapper"></div>

</body>
</html>

aquanetta

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #17 on: September 18, 2011, 10:31:38 PM »
The best of design the HTML code is the using of the tables in the codes.If u alter the table align property as center means the web page get to the center.
code

  <table align=center>

Cegonsoft
« Last Edit: September 19, 2011, 08:23:47 PM by aquanetta »
Logged

jakkwilliams

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 10
Re: Centering web page
« Reply #18 on: September 29, 2011, 05:23:17 PM »
This box is angular centered by ambient its adapted and larboard allowance widths to "auto". This is the adopted way to accomplish accumbent assimilation with CSS, and works absolute able in a lot of browsers with CSS2 support.

seminayak

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #19 on: December 20, 2011, 11:14:18 PM »
This is a very simple thing to do with CSS. Here's all you need:

<body>  <div id="wrapper">   ...  </div> </body>
In this example, the div with the id of "wrapper" is what we want to make centered and fixed width. Now for the CSS:


body {  margin: 0;  padding: 0;  text-align: center; } #wrapper {  margin: 0 auto;  border: 1px solid red;  padding: 0;  width: 720px;  text-align: left; }
Then within your wrapper, just fill it in with your content. Hope that helps.


Yes You can try this.

sunnyhamer

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #20 on: January 01, 2012, 10:20:24 PM »
This is really useful thread for me . You all have posted here interesting topic and also nicelly discussion on it. I have read almost post and got many point , it will more help me a lot in my project.

seniorlivingca

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 137
Re: Centering web page
« Reply #21 on: January 05, 2012, 01:20:27 AM »
Centering anything requires setting a width less than 100% for the container. Example:

body
{
width: 950px;
height: 600px;
margin: 0 auto;
background: #fff url(path to non-tiled image) no-repeat center scroll;
}

Change parameters as you need. Set "#fff" to background color you want.Set "scroll" to "fixed" if you want page contents to scroll over background image.

lakesideweddingevent

  • Jr. Member
  • **
  • Karma: +0/-0
  • Posts: 50
Re: Centering web page
« Reply #22 on: January 09, 2012, 01:18:58 AM »
<head>
</head>
<title>
<body bgcolor="#111111" leftmargin="40">
<center>
<table id="Table_2" width="766" height="780" border="1" cellpadding="1.5" cellspacing="1">
</title>..

eddiecrosby

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 13
Re: Centering web page
« Reply #23 on: February 02, 2012, 01:02:39 PM »
I saw this message Centering Web page after Web Message Centering seen this page, I looked about centering web page and acquire positive knowledge about centering web page.

alijeckson

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #24 on: May 10, 2012, 01:31:08 AM »
This box is angular centered by ambience its appropriate and larboard allowance widths to "auto". This is the adopted way to achieve accumbent absorption with CSS, and works actual able-bodied in a lot of browsers with CSS2 support.

katejoli

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #25 on: May 14, 2012, 12:43:30 AM »
This box is angular centered by ambience its appropriate and larboard allowance widths to "auto". This is the adopted way to achieve accumbent absorption with CSS, and works actual able-bodied in a lot of browsers with CSS2 support.

lakesideweddingevent

  • Jr. Member
  • **
  • Karma: +0/-0
  • Posts: 50
Re: Centering web page
« Reply #26 on: May 15, 2012, 10:40:00 PM »
This box is angular centered by ambience its appropriate and larboard allowance widths to "auto". This is the adopted way to achieve accumbent absorption with CSS, and works actual able-bodied in a lot of browsers with CSS2 support.

peermurphy

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 5
Re: Centering web page
« Reply #27 on: May 15, 2012, 10:59:52 PM »
I seen this Centering web page Post, After saw this Centering web page Post, I searched about Centering web page and Getting the Positive Knowledge about Centering web page.
Pages: 1 [2]