Pretty new to Dreamweaver, but have been developing sites for a few years. Been having problems laying out these AP divs (previously called layers).

How do I keep my text from being misaligned when the browser window changes sizes? (view attached screenshot to see what I'm talking about)


DON'T use absolute positioning.

Create a wrapper div first, give it a width, and then set margin:auto for it in the css. That will center it.

Inside that div create a header div and inside that put the content that is your header image (probably better as the background image to the header) and the menu (created using an unordered list, styled by css).

Also inside the wrapper div, create your content div and give it the image we can see your text sitting on as the background to it.

Then enter your content inside that div.

Alternatively and possibly better, set the entire image we can see as the background to the wrapper div. (Remembering to set the background color of the body itself to the blue we can see.)

DO NOT use absolute positioning because, as you have just discovered, it is not the correct solution the vast majority of the time, and should only be used in some odd occasions. Do not use drag and drop to position things.

PS Layers was a word invented by Netscape, the correct term has always been div.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.