Jump to content

Javascript Layer Size and Positioning


skaterdav85

Recommended Posts

So I made this website for a professor and i used JS to open and close the layer, but when i resize my browser, the layer stays in the same place. But I want the layer to always stay under its title "View Past Hospitals Here". The site is http://healthcareengineering.usc.edu/ and click on "View Past Hospitals Here" to view the Layer.If anyone can help me that'd be excellent! Layers are tricky!

Link to comment
Share on other sites

Absolutely positioned division, not layer. Layer is an old Netscape term. :)Make the parent position:relative; and use margins instead of the top: and left: properties to shift the division in question.

Link to comment
Share on other sites

Absolutely positioned division, not layer. Layer is an old Netscape term. :)Make the parent position:relative; and use margins instead of the top: and left: properties to shift the division in question.
ok so i did this, and it messed up my whole center div. did i misunderstand?#PastHosp { position:relative; width:232px; height:163px; z-index:1; background-color: #e8eaec; border: solid thin black; margin-left: 608px; margin-top: 293px; padding: 3px; visibility: hidden;}
Link to comment
Share on other sites

No. On the <td> that contains the #PastHosp division, make that position:relative;.Then, on #PastHosp, keep it position:absolute; but get rid of the top: and left: properties, and replace them with margin-top: and margin-left:. The values will have to be adjusted, too.

Link to comment
Share on other sites

No. On the <td> that contains the #PastHosp division, make that position:relative;.Then, on #PastHosp, keep it position:absolute; but get rid of the top: and left: properties, and replace them with margin-top: and margin-left:. The values will have to be adjusted, too.
ok so i did this<td style="position:relative;"> on the td that contains the div and i changed the #PastHosp properties to margin-top and margin-left along w these respective values, but the AP Div still stays in the same place when u change the browser size. Any idea? AP Divs are frustrating!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...