Discussion:
AP div & Locking
(too old to reply)
R-d0g
2008-03-15 02:31:34 UTC
Permalink
Hey Guys,

Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.

Anyway to lock the Div in place?

Please help.
TC2112
2008-03-15 04:14:58 UTC
Permalink
Hello,

That's because an AP Div is positioned aboslutely x amount of pixels from
the left and x amount of pixels from the top of the browser window in your
case. As the browser window shrinks or widens, the image centers but the AP
Div stays the same distance from the left.

I should mention there are reasons not to do this for your home page, such
as search engines will not see any content and you'll be lucky to get your
site listed. Some people also find splash pages annoying.
Also, using Layers is not a good technique and can cause all kinds of
trouble. More about that in a minute.

If you still want to make a splash page:

Why not make the image the page's background image then place the word on
the page and align it center?

To do that:
Delete the image.
Type the word and align center in the properties window.

It will put this in your code:
<div align="center">Enter</div>

Right click on the page. Select CSS Styles > New
Select the "Tag" radio button.
Select "body" in the Tag dropdown menu.
Select the "Define in: This Document Only" radio button.

In the dialog box that opens, select "Box" under "Category".
Under padding, leave the "same for all" checkbox checked and type 0 in the
"top" box.
Uncheck the "same for all" checkbox under margin, and type 200 in the "top"
box and select pixels..
This will make the word "enter" position 200px from the top of the window,

Then, select "background" under "Category"
Browse to your image.
In the "repeat" dropdown, select "no repeat"
In the "horizontal position" dropdown, select "center".
In the "vertical position" dropdown, enter a value of how many pixels you
want the image to be from the top of the browser window.

Now you have the word "enter" centered horizontally on the page and 200
pixels from the top.
The image is behind the word, centered horizontally and x pixels from the
top.

A bit of advice if I may. Get out of "Layout Mode" and never go back. Using
layers will lead to all kinds of trouble.
Adobe is even dropping layout mode from the next version of DW.
Just search the forum for "layout" and read hundreds of posts entitled "my
page breaks" or "my text overlaps" and so on, all being answered with "don't
use layers" and many other options given.
Here's a couple links that explain:
A picture is worth a thousand words:
http://www.great-web-sights.com/g_layer-overlap.asp
More detail:
http://apptools.com/examples/pagelayout101.php

You should use Standard mode. View > Table Mode > Standard Mode.
And the first thing you should do if you don't know it already is learn HTML
and CSS. DW will be much easier to use if you understand what DW is doing
for you when it writes code.
Here's a great place to start:
http://www.w3schools.com/

To change the pixel values you can either look at the page in code view and
change them there, or just double click on the word "body" in the CSS Styles
window to open the dialog box again. If the window isn't open, Window > CSS
Styles.

The instructions given above will create code similar to this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 200px;
background-image: url(mypicture.jpg);
background-repeat: no-repeat;
background-position: center 100px;
}
-->
</style>
</head>
<body>
<div align="center">enter</div>
</body>
</html>

Again, please reconsider using this as your home page unless you're sure
your visitors will already know the URL to go to.
Also, there are other methods to center content on a page such as using a
"wrapper" div to contain the content. Just search for "center page" in this
forum.
With something as simple as one word, I thought the above was fine.

Take care,
Tim
Post by R-d0g
Hey Guys,
Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.
Anyway to lock the Div in place?
Please help.
robert
2008-03-15 05:59:28 UTC
Permalink
Hey thanks TC great answer taugat me a lot too. old bob
Post by TC2112
Hello,
That's because an AP Div is positioned aboslutely x amount of pixels from
the left and x amount of pixels from the top of the browser window in your
case. As the browser window shrinks or widens, the image centers but the
AP Div stays the same distance from the left.
I should mention there are reasons not to do this for your home page, such
as search engines will not see any content and you'll be lucky to get your
site listed. Some people also find splash pages annoying.
Also, using Layers is not a good technique and can cause all kinds of
trouble. More about that in a minute.
Why not make the image the page's background image then place the word on
the page and align it center?
Delete the image.
Type the word and align center in the properties window.
<div align="center">Enter</div>
Right click on the page. Select CSS Styles > New
Select the "Tag" radio button.
Select "body" in the Tag dropdown menu.
Select the "Define in: This Document Only" radio button.
In the dialog box that opens, select "Box" under "Category".
Under padding, leave the "same for all" checkbox checked and type 0 in the
"top" box.
Uncheck the "same for all" checkbox under margin, and type 200 in the
"top" box and select pixels..
This will make the word "enter" position 200px from the top of the window,
Then, select "background" under "Category"
Browse to your image.
In the "repeat" dropdown, select "no repeat"
In the "horizontal position" dropdown, select "center".
In the "vertical position" dropdown, enter a value of how many pixels you
want the image to be from the top of the browser window.
Now you have the word "enter" centered horizontally on the page and 200
pixels from the top.
The image is behind the word, centered horizontally and x pixels from the
top.
A bit of advice if I may. Get out of "Layout Mode" and never go back.
Using layers will lead to all kinds of trouble.
Adobe is even dropping layout mode from the next version of DW.
Just search the forum for "layout" and read hundreds of posts entitled "my
page breaks" or "my text overlaps" and so on, all being answered with
"don't use layers" and many other options given.
http://www.great-web-sights.com/g_layer-overlap.asp
http://apptools.com/examples/pagelayout101.php
You should use Standard mode. View > Table Mode > Standard Mode.
And the first thing you should do if you don't know it already is learn
HTML and CSS. DW will be much easier to use if you understand what DW is
doing for you when it writes code.
http://www.w3schools.com/
To change the pixel values you can either look at the page in code view
and change them there, or just double click on the word "body" in the CSS
Styles window to open the dialog box again. If the window isn't open,
Window > CSS Styles.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 200px;
background-image: url(mypicture.jpg);
background-repeat: no-repeat;
background-position: center 100px;
}
-->
</style>
</head>
<body>
<div align="center">enter</div>
</body>
</html>
Again, please reconsider using this as your home page unless you're sure
your visitors will already know the URL to go to.
Also, there are other methods to center content on a page such as using a
"wrapper" div to contain the content. Just search for "center page" in
this forum.
With something as simple as one word, I thought the above was fine.
Take care,
Tim
Post by R-d0g
Hey Guys,
Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.
Anyway to lock the Div in place?
Please help.
Murray *ACE*
2008-03-15 12:32:33 UTC
Permalink
Post by TC2112
A bit of advice if I may. Get out of "Layout Mode" and never go back.
Using layers will lead to all kinds of trouble.
(* Layout Mode has nothing to do with layers *) 8)
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
Post by TC2112
Hello,
That's because an AP Div is positioned aboslutely x amount of pixels from
the left and x amount of pixels from the top of the browser window in your
case. As the browser window shrinks or widens, the image centers but the
AP Div stays the same distance from the left.
I should mention there are reasons not to do this for your home page, such
as search engines will not see any content and you'll be lucky to get your
site listed. Some people also find splash pages annoying.
Also, using Layers is not a good technique and can cause all kinds of
trouble. More about that in a minute.
Why not make the image the page's background image then place the word on
the page and align it center?
Delete the image.
Type the word and align center in the properties window.
<div align="center">Enter</div>
Right click on the page. Select CSS Styles > New
Select the "Tag" radio button.
Select "body" in the Tag dropdown menu.
Select the "Define in: This Document Only" radio button.
In the dialog box that opens, select "Box" under "Category".
Under padding, leave the "same for all" checkbox checked and type 0 in the
"top" box.
Uncheck the "same for all" checkbox under margin, and type 200 in the
"top" box and select pixels..
This will make the word "enter" position 200px from the top of the window,
Then, select "background" under "Category"
Browse to your image.
In the "repeat" dropdown, select "no repeat"
In the "horizontal position" dropdown, select "center".
In the "vertical position" dropdown, enter a value of how many pixels you
want the image to be from the top of the browser window.
Now you have the word "enter" centered horizontally on the page and 200
pixels from the top.
The image is behind the word, centered horizontally and x pixels from the
top.
A bit of advice if I may. Get out of "Layout Mode" and never go back.
Using layers will lead to all kinds of trouble.
Adobe is even dropping layout mode from the next version of DW.
Just search the forum for "layout" and read hundreds of posts entitled "my
page breaks" or "my text overlaps" and so on, all being answered with
"don't use layers" and many other options given.
http://www.great-web-sights.com/g_layer-overlap.asp
http://apptools.com/examples/pagelayout101.php
You should use Standard mode. View > Table Mode > Standard Mode.
And the first thing you should do if you don't know it already is learn
HTML and CSS. DW will be much easier to use if you understand what DW is
doing for you when it writes code.
http://www.w3schools.com/
To change the pixel values you can either look at the page in code view
and change them there, or just double click on the word "body" in the CSS
Styles window to open the dialog box again. If the window isn't open,
Window > CSS Styles.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 200px;
background-image: url(mypicture.jpg);
background-repeat: no-repeat;
background-position: center 100px;
}
-->
</style>
</head>
<body>
<div align="center">enter</div>
</body>
</html>
Again, please reconsider using this as your home page unless you're sure
your visitors will already know the URL to go to.
Also, there are other methods to center content on a page such as using a
"wrapper" div to contain the content. Just search for "center page" in
this forum.
With something as simple as one word, I thought the above was fine.
Take care,
Tim
Post by R-d0g
Hey Guys,
Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.
Anyway to lock the Div in place?
Please help.
TC2112
2008-03-15 15:59:40 UTC
Permalink
D'oH!. that's right, "draw AP Div" only works in Standard Mode :-)
I don't know why I started thinking of layout mode :-/.
Thanks, Murray.
Sorry for any confusion, R-d0g.

The recommendation is the same, but let me clarify what I tried to say:

Using AP Divs as a layout tool can lead to trouble and you should stay away
from it for the reasons shown in the links.

As far as Layout Mode, I would also recommend staying away from that feature
if you've even considered using it and keep working in Standard Mode. It's
tempting as you can drag and drop to position cells, but you pay a big
price. It can create some very bloated table code filled with rowspans and
colspans that make the layout very fragile. A simple change in part of the
layout, such as a user increasing the text size in his or her browser, can
cause a ripple through the layout and break the page apart. It's Layout Mode
that's not going to be included in the next version of DW.


Take care,
Tim
Post by Murray *ACE*
Post by TC2112
A bit of advice if I may. Get out of "Layout Mode" and never go back.
Using layers will lead to all kinds of trouble.
(* Layout Mode has nothing to do with layers *) 8)
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
Post by TC2112
Hello,
That's because an AP Div is positioned aboslutely x amount of pixels from
the left and x amount of pixels from the top of the browser window in
your case. As the browser window shrinks or widens, the image centers but
the AP Div stays the same distance from the left.
I should mention there are reasons not to do this for your home page,
such as search engines will not see any content and you'll be lucky to
get your site listed. Some people also find splash pages annoying.
Also, using Layers is not a good technique and can cause all kinds of
trouble. More about that in a minute.
Why not make the image the page's background image then place the word on
the page and align it center?
Delete the image.
Type the word and align center in the properties window.
<div align="center">Enter</div>
Right click on the page. Select CSS Styles > New
Select the "Tag" radio button.
Select "body" in the Tag dropdown menu.
Select the "Define in: This Document Only" radio button.
In the dialog box that opens, select "Box" under "Category".
Under padding, leave the "same for all" checkbox checked and type 0 in
the "top" box.
Uncheck the "same for all" checkbox under margin, and type 200 in the
"top" box and select pixels..
This will make the word "enter" position 200px from the top of the window,
Then, select "background" under "Category"
Browse to your image.
In the "repeat" dropdown, select "no repeat"
In the "horizontal position" dropdown, select "center".
In the "vertical position" dropdown, enter a value of how many pixels you
want the image to be from the top of the browser window.
Now you have the word "enter" centered horizontally on the page and 200
pixels from the top.
The image is behind the word, centered horizontally and x pixels from the
top.
A bit of advice if I may. Get out of "Layout Mode" and never go back.
Using layers will lead to all kinds of trouble.
Adobe is even dropping layout mode from the next version of DW.
Just search the forum for "layout" and read hundreds of posts entitled
"my page breaks" or "my text overlaps" and so on, all being answered with
"don't use layers" and many other options given.
http://www.great-web-sights.com/g_layer-overlap.asp
http://apptools.com/examples/pagelayout101.php
You should use Standard mode. View > Table Mode > Standard Mode.
And the first thing you should do if you don't know it already is learn
HTML and CSS. DW will be much easier to use if you understand what DW is
doing for you when it writes code.
http://www.w3schools.com/
To change the pixel values you can either look at the page in code view
and change them there, or just double click on the word "body" in the CSS
Styles window to open the dialog box again. If the window isn't open,
Window > CSS Styles.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 200px;
background-image: url(mypicture.jpg);
background-repeat: no-repeat;
background-position: center 100px;
}
-->
</style>
</head>
<body>
<div align="center">enter</div>
</body>
</html>
Again, please reconsider using this as your home page unless you're sure
your visitors will already know the URL to go to.
Also, there are other methods to center content on a page such as using a
"wrapper" div to contain the content. Just search for "center page" in
this forum.
With something as simple as one word, I thought the above was fine.
Take care,
Tim
Post by R-d0g
Hey Guys,
Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.
Anyway to lock the Div in place?
Please help.
R-d0g
2008-03-16 23:09:13 UTC
Permalink
So the both of you are suggesting staying out of layout mode and figuring out
table sizes on your own? How about AP Div's

So to go back to my question and sorry you maybe have answered it but I didn't
understand.... Is there a way to make a table base site and add some AP Divs
and lock them so that they stay centered within the centered layout after
previewing on the internet? When I move my window larger and smaller the site
moves, centering itself but the AP Divs stay where I placed them as if they
were fixed.

Thanks
TC2112
2008-03-17 00:42:23 UTC
Permalink
Hello,
Yes, stay out of Layout Mode. Just Insert>Table in standard mode. Resize it
if needed in the Property Inspector.
AP Divs can cause trouble as well, as shown in the links posted.

To answer your question, you can wrap everything in a relatively positioned
"wrapper" or container div.
If you give the wrapper a width, and set the left and right margin to "auto"
it will center it on the page.
Any AP div within will take it's position from the relatively positioned
wrapper div, so they will "stay with" the wrapper as it centers.

Just paste this code into a blank page to see how it works.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
text-align:center;
background-color:#0033FF;
}
#wrapper {
width: 700px;
position: relative;
margin: 0px auto;
text-align:left;
background-color:#FFFFCC;
}
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
background-color: #FFCC00;
left: 20px;
top: 20px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="apDiv1">
<p>AP Div</p>
<p> dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, </p>
</div>
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><p>Table</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam,
at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie
in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare
risus quis ligula. Phasellus tristique purus a augue condimentum
adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique
in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy.
Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget,
tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl.
Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque
eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend
sollicitudin, molestie id, varius et, nibh. Donec nec libero.</p></td>
</tr>
</table>
</div>
</body>
</html>

Take care,
Tim
Post by R-d0g
So the both of you are suggesting staying out of layout mode and figuring out
table sizes on your own? How about AP Div's
So to go back to my question and sorry you maybe have answered it but I didn't
understand.... Is there a way to make a table base site and add some AP Divs
and lock them so that they stay centered within the centered layout after
previewing on the internet? When I move my window larger and smaller the site
moves, centering itself but the AP Divs stay where I placed them as if they
were fixed.
Thanks
Murray *ACE*
2008-03-17 10:38:03 UTC
Permalink
This may help you understand positioning a bit -

There are 4 different types of positioning:
Absolute
Relative
Fixed
Static

Here is a brief explanation of each kind of positioning (with regard to
placement of elements on the page only)....

Position:absolute (or A/P elements)
-----------------------
This does several things -
1. It 'removes' the element from the flow of the code on the­ page so that
it can no longer influence the size or position of any other pa­ge element
(except for those contained within it, of course).

2. The absolutely positioned element takes its position from the position of
its closest PA­RENT *positioned* element - in the absence of any explicitly
positioned parent, this will default to the <body> tag, which is always
positioned
­at 0,0 in the browser viewport.

This means that it doesn't matter where in the HTML code the laye­r's code
appears (between <body> and </body>), its location on the screen will not
change (this assumes that you have not positioned the A/P element within
a table or another A/P element, of course). Furthe­rmore, the space in
which
this element would have appeared were it not positi­oned is not preserved
on the screen. In other words, absolutely positioned elements don't take
up any space on the page. In fact, they FLOAT over the page.

Position:relative (or R/P elements)
----------------------
In contrast to absolute positioning, a relatively positioned page element is
*not* removed from t­he flow of the code on the page, so it will use the
spot
where it would have­ appeared based on its position in the code as its
zero point reference. If­ you then supply top, right, bottom, or left
positions
to the style for this ­element, those values will be used as offsets from
its
zero point.

This means that it DOES matter where in the code the relativ­ely positioned
element appears (, as it will be positioned in that location (­factoring in
the offsets) on the screen (this is true for any placement in the code).
Furthermore, the space where this e­lement would have appeared is
preserved in the display, and can therefore­ affect the placement of
succeeding elements. This means that the taller a relatively
positioned element is, the more space it forces on the page.

Position:static
-------------------
As with relative position, static positions also "go with ­the flow". An
element with a static position cannot have values for offset­s (top, right,
left, bottom) or if it has them, they will be ignored. Unless explicitly
positioned, all div elements default to static positioning.

Position:fixed
------------------
A page element with this style will not scroll as the page c­ontent scrolls.
Support for this in elements other than page backgrounds is ­quirky

There are several other things you need to know:

1. ANY page element can be positioned - paragraphs, tables, images, lists,
etc.
2. The <div> tag is a BLOCK level tag. This means that if it is not
positioned or explicitly styled otherwise, a) it will always begin on a new
line on the screen, and b) it will always force content to a new line below
it, and c) it will always take up the entire width of its container (i.e.,
width:100%).
3. The placement of A/P elements *can* affect the BEHAVIOR of other
elements
on the page. For example, a 'layer' placed over a hyperlink will mask that
hyperlink.

You can see a good example of the essential difference between absolute and
relative positioning here -

http://www.great-web-sights.com/g_layersdemo.asp

You can see a good demonstration of why using layers for a page layout tool
is dangerous here -

http://www.great-web-sights.com/g_layer-overlap.asp
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
Post by TC2112
Hello,
Yes, stay out of Layout Mode. Just Insert>Table in standard mode. Resize
it if needed in the Property Inspector.
AP Divs can cause trouble as well, as shown in the links posted.
To answer your question, you can wrap everything in a relatively
positioned "wrapper" or container div.
If you give the wrapper a width, and set the left and right margin to
"auto" it will center it on the page.
Any AP div within will take it's position from the relatively positioned
wrapper div, so they will "stay with" the wrapper as it centers.
Just paste this code into a blank page to see how it works.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
text-align:center;
background-color:#0033FF;
}
#wrapper {
width: 700px;
position: relative;
margin: 0px auto;
text-align:left;
background-color:#FFFFCC;
}
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
background-color: #FFCC00;
left: 20px;
top: 20px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="apDiv1">
<p>AP Div</p>
<p> dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, </p>
</div>
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><p>Table</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum
diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id,
molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque
ornare risus quis ligula. Phasellus tristique purus a augue condimentum
adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique
in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy.
Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius
eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut
nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu,
pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi,
eleifend sollicitudin, molestie id, varius et, nibh. Donec nec
libero.</p></td>
</tr>
</table>
</div>
</body>
</html>
Take care,
Tim
Post by R-d0g
So the both of you are suggesting staying out of layout mode and figuring out
table sizes on your own? How about AP Div's
So to go back to my question and sorry you maybe have answered it but I didn't
understand.... Is there a way to make a table base site and add some AP Divs
and lock them so that they stay centered within the centered layout after
previewing on the internet? When I move my window larger and smaller the site
moves, centering itself but the AP Divs stay where I placed them as if they
were fixed.
Thanks
f***@gmail.com
2012-09-03 09:07:16 UTC
Permalink
Post by R-d0g
Hey Guys,
Designing my first website with Dreamweaver CS3. I've been pulling my hair out
trying to get my AP Div to be centered on my page. What I have on my index page
is a background, then I inserted an image which I centered using the Properties
window at the bottom of the page. Previewed it in Safari and Firefox and it
worked... nice and centered. I now want to place an AP Div with the word
"Enter" in the center of everything (on top of the placed image). I inserted an
AP Div, typed the word "Enter", went to my CSS and picked the font, color and
then position by selecting "absolute." In Dreamweaver it looks great, when I
preview it, the background and placed image are perfectly centered but my AP
div isn't locking into the center. When I make my safari window bigger and
smaller everything moves correctly but not the AP Div.
Anyway to lock the Div in place?
Please help.
Loading...