Forum Moderators: not2easy

Message Too Old, No Replies

layer problem

         

futureknight

6:28 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



I'm coding a webpage, and the site designer is using an image for the topnav and such. Included in this graphic is the search area. I figured this was no problem as I would just put a layer containing the site search field in the proper place.

I have found, however that this is tossing page alignment off a tad (and weirdly, the misalignment remains even after a remove the div and refresh the page and all that). Anyway, my question is: does anyone know what could cause this?

I'm not too familiar with layers, I'm also confused because I've stuck the div inside a table cell.. The table is designed to expand and contract based on browser window size..yet the layer isn't moving. Isn't the div tag supposed to do what the table cell does because it's stuck within it?

thanks in advance for any assistance..

Stratus42

4:43 pm on Jul 16, 2004 (gmt 0)

10+ Year Member



Hi futureknight

it might help if you posted some of your css for the layer.. but my understanding is.. if you have a layer.. you've assigned it a position:absolute and a top and left positioning on the page as well as, probably, a z-index in which case.. it stays put no matter what the rest of the page does.

something that is positioned absolutely, dosn't move around when the page expands / contracts etc.

cheers

L.

Rhys

12:04 am on Jul 21, 2004 (gmt 0)

10+ Year Member



My understanding of div positioning it that they are dependant on whatever container they are in.
In the above case, the container is the page, not a table cell. You would need a container (div) around the whole graphic and then position your search thingy off that. (Preferably away from the right border to allow for resizing.) Then you can use absolute positioning terms, and they will relate to the top left of the containing div.