# Center page in DREAMWEAVER/HTML

**URL:** https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419
**Category:** Uncategorized
**Created:** [October 30, 2002, 5:11pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419 "2002-10-30T17:11:03Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Pjc4real](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@Pjc4real](https://forum.kirupa.com/u/Pjc4real)
#### Post date: [October 30, 2002, 5:11pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/1 "2002-10-30T17:11:03Z")

</div>

How can I center my page in dreamweaver/HTML??? The image is 1024x768, which is the res I am using now… so why do scrollbars appear, and I have to manually scroll to center the page/image?? it doesn’t make sense… ne ideas???

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 5:20pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/2 "2002-10-30T17:20:30Z")

</div>

keep in mind you have navigation bars at the top of your browser, so you don’t have a full 1024x768…about 150 pixels less…

Also, keep in mind your visitors… over 60% of sites visited on the web are visited with 800x600 res… It’s up to you to decide whether to ignore these people…

I personally recommend 750x450 maximum…

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 5:22pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/3 "2002-10-30T17:22:53Z")

</div>

Ok thanx… yeh, my actual main content is 600x400 (a flash mvoie), but I had like a border as an image, which, if I don’t save it at full size, it tiles… Neway to stop it from tiling? In that way, It could be a lot smaller…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 5:25pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/4 "2002-10-30T17:25:32Z")

</div>

Use a single cell table, then center the flash movie both vert and horiz… then use the border image as a cell bg…

Maybe that will work?

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 5:32pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/5 "2002-10-30T17:32:52Z")

</div>

hmmmm… can u put a flash movie in a table??? It doesnt seem willing to let me do that…

I can’t understand why I can’t just use 2layers.

Do u know of ne way to stop an image from tiling???

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 5:36pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/6 "2002-10-30T17:36:10Z")

</div>

yes, simply embed the flash movie in the cell( almost all Flash only sites use a table of some kind to center the movie in the browser)… :-\

there is no way to keep the bg image from tiling, except to make it big enough not to show.

The way I spoke of before is the way to ensure the bg image is only in the area of the flash movie…

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 6:48pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/7 "2002-10-30T18:48:04Z")

</div>

I see… As u can tell from my absence, I hav been trying, but still no luck… I’ve embedded the swf in a table, but now how do I VERTICALLY center it…???

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:07pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/8 "2002-10-30T19:07:38Z")

</div>

```php

<table width="100%" height="100%">
<tr>
<td width="100%" height="100%" align="center" valign="middle">

//EMBED CODE HERE

</td>
</tr>
</table>

```

If you want to use a background image on your page with no repeating just add this between the head tags on your page…

```php

<STYLE TYPE="text/css">
<--
body {background-repeat: no-repeat; background-image: url(background.gif); }
-->
</STYLE>

```

If you want to do that on a table just use the word “td” in place of body on the script.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:29pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/9 "2002-10-30T19:29:22Z")

</div>

lostinbeta, does that work in both browsers?

I rarely use css, becuase of the cross-browser issues…

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:31pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/10 "2002-10-30T19:31:50Z")

</div>

Erm… I am pretty sure it does… I guess I should check that.

But again, I am pretty sure it does.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:34pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/11 "2002-10-30T19:34:49Z")

</div>

Thnax for the help Reverend and LostInBeta… I managed to get evrything centred and matching. I didnt need to use the CSS in the end, just was a case of getting the table to do exactly what I wanted it to do. Ur advice worked reverend… I put the swf into a cell, and used the cell background for the “behind” image.

Cheers guys:)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:36pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/12 "2002-10-30T19:36:53Z")

</div>

Glad it helped…

😛

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:46pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/13 "2002-10-30T19:46:57Z")

</div>

I am glad you got it to work as well…

Rev: I just tested the CSS in Netscape and it works like a charm 🙂

This is the code I used…

```php
<STYLE TYPE="text/css">
<!--
BODY { background-attachment: fixed; background-image: url(image.gif); }
-->
</STYLE>

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:48pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/14 "2002-10-30T19:48:16Z")

</div>

thanks lostinbeta, I’ll have to put that in my “bag o’ trix” :rambo:

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:50pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/15 "2002-10-30T19:50:24Z")

</div>

Haha, if only I could post all my CSS knowledge here 😛

Then you could add all of it into your bag o’ tricks :beam:

And as far as I know, all my tricks do work in both browsers.

I have used them in previous versions of my site, and all previous versions of my site (with exception of current version) have been NS and IE compatible.

Oh yeah, and the background-attachment: fixed sicks your background image in place, so if you have to scroll, the background image won’t scroll with it. It will just stay there.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:52pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/16 "2002-10-30T19:52:33Z")

</div>

Yeah, that would be cool, I essentially stopped coding HTML about the time CSS came out… :evil: I just got lazy…plus I haven’t had any clients which require it…😛

But it is a great tool, as long as it works… :x

Rev:elderly:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 30, 2002, 7:58pm UTC](https://forum.kirupa.com/t/center-page-in-dreamweaver-html/7419/17 "2002-10-30T19:58:12Z")

</div>

I love CSS… it makes things so much easier, shorter to code and makes a page less cluttered with code.

And it saves a lot on loading times if you find yourself using a lot of un neccessary tags that can easily be done in CSS.
