PDA

View Full Version : Newbie - layers relative to image


jeffd
10-03-2010, 02:44 PM
Hi all

I am taking first steps into web design and have created an html file that has a jpeg image centred on the page - i have then created 4 squares that i want to occupy about 95% of the area of said jpeg.

I can get the layers to look ok (position wise) within dw but the moment you view on web and resize window the layers stay in static position whilst the centred jpeg moves with window always remaining in middle.

I want to understand how to get the 4 layers to move with the jpeg centred.

Tried all settings within properties for each of the four appdiv - can't seem to make it work

any help most appreciated .... total beginner here ;-)

File online here
http://www.filetrans.co.uk/

Corrosive
10-03-2010, 02:51 PM
Hi and welcome to the forum. If you want layers to stay put (and I wouldn't recommend basing your whole layout on apdivs) then wrap them in a div with relative positioning. That way the reference point will be the top left of the div rather than the top left of the browser window (which is causing your issue).

You need to do some more research before diving into development. Read up about relative positioning divs, CSS and page flow for starters. You're on a path to heartache at the moment.

DWcourse
10-04-2010, 08:45 PM
You need to do some more research before diving into development. Read up about relative positioning divs, CSS and page flow for starters. You're on a path to heartache at the moment.

Amen brother!