View Full Version : Div Layer - Absolute Position doesn't stay same in different screen resolutions.


spadilla
05-27-2006, 02:30 PM
Hello LEIA users, I was wondering if some kind soul could help me. I have search this problem in these forums and have not yet seen a solution posted in reply to anyones question.

I have been using div layers in website layouts for years. I have never come accross this problem before, and wonder if it is a problem only when editing a myspace layout. I have never used myspace before, it is my brothers account and I was asked to create a layout to match his preferences.

I placed a div layer on the page and positioned it accordingly. I have a laptop and a pc, they both have different screen resolutions. I was happy with the layout when i edited using the laptop, but have since used my mothers laptop and my pc to find that the div layer was too far left. I don't understand as I used absolute positioning. I changed the positions so that they fit with my pc's screen resolution, but now, on my pc it's all wrong.

I did not set the positions in the internal css and wondered if this could be the problem. I tried that and it did not want to work at all so I changed it back.

I was wondering if there is anyone familiar to myspace that has come accross this problem, or if it is a fault in my coding...I'm not even sure if it will be a noticable problem to anyone who views the profile as I only noticed when using a different computer. I wouldn't have known otherwise.

Profile - Click here (http://www.myspace.com/zapadilla)

The problem is with the silver "Zapa D" logo. which should fit directly above the profile image in the first box.

My div layer basic code -

<div id=layer1 style="position:absolute; top:194; left:255; width:300; height:35; z-index:1;">
<img src="http://i4.photobucket.com/albums/y146/sp84/zapadlogoimageheader02.gif">
</div>

Thankyou for any and all help you can give!

pb&j
05-27-2006, 07:49 PM
this may or may not make a difference, but it is always a good idea to include the measurement type in your values. some browsers may interpret it differently if you leave them out...

<div id="layer1" style="position:absolute; top:194px; left:255px; width:300px; height:35px; z-index:1;">
<img src="http://i4.photobucket.com/albums/y146/sp84/zapadlogoimageheader02.gif">
</div>

spadilla
05-27-2006, 09:39 PM
Thankyou for your reply! I will keep that tip in mind, I wasn't aware that there was another type of measurement that could be used.

I tried that but it didn't make a difference to this myspace layout, it seems like it's not willing to work.

Another thing I found, when I minimise the page the div stays in the same positions but the rest of the page re-adjusts itself to fit in the browser window. This is the problem with the div layer and I cannot think of a solution if I am not able to fully edit the page. I will have to rethink the whole design >.<

Thankyou again!