I've built an html page with a backgroung htm file. On top of that I have put a layer, so that the layer can be modified when the content changes.
The problem is that every different computer screen (all different widths) I look at, the layer moves around and isn't anchored in the same spot.
You can see this at www.southlanddreamer.com and click on Builder's Corner, for example.
What's the solution to this problem ? Thank you for your help, Margie
The "layers" you mention are actually a
table that is centered on the page and another
table inside a
div that uses
position:absolute to position it above the first table. The
div is positioned with
Think about that for a moment: one of your layers is always centered, the other is always 500px from the left. Of course they're not going to line up correctly!
Here's the easy answer: Change the CSS for the
The "50%" puts the left edge of the
div right in the middle of the screen, and therefore in the middle of your background layer. The negative
margin-left moves the
div towards the left; play with this number until you get the
div right where you want it.
[I call that the easy answer and not the right answer, because the right answer involves scrapping your layout tables and spacer GIFs completely, ordering your content logically and semantically, and building the CSS on top of that.]