I have positioned elements on my screen using this code: style="position:absolute; z-index:-1; left:885px; top:293px;" Code (markup): I attempted to zoom in and the elements were positioned wrong. I'm starting to get worried that if viewed on computers with different screen sizes my elements will be position wrongly. Is there anyway I can fix this error?
Without seeing what you are positioning, or why - there's not a lot we can tell you - much less what browser are you 'zooming' in? Firefox's pathetic attempt at zoom is a joke that breaks on damned near every site - though a lot of people call it's old netscape style text-sizing zoom (which it isn't) ... Saffy/Chrome don't even HAVE a real zoom function, and don't even get me STARTED about how IE tries to do it. Hell, the only browser to get it right is Opera... But without FULL code and images we really can't help you a whole lot. One little snippet of inlined style is meaningless without the element it's being applied to, the parent elements on which it's positioning is based, and a whole load of other things. (which BTW I consider STYLE a no-no in the first damned place; I'd obsolete STYLE both as a tag and as an attribute if I was running things - get that **** into an external sheet where it belongs!)
I tried to view it in IE. I'm using it as a button and it is relative to the whole page. Code: <img src="../../../Images/back_room1.gif" alt="Go Back" name="back_room_button" width="50" height="20" align="bottom" id="back_room_button" style="position:absolute; z-index:-1; left:885px; top:293px;" onmousedown="roombackmouseDowns()" onmouseup="roombackmouseUps()" onmouseover="roombackmouseOvers()" onmouseout="roombackmouseOuts()" /> Code (markup): What do you suggest I do and do you want a link to my site. (The site's still in development, and many of the links are broken) Thanks!
Oh lord, that's bad. Javascript for rollovers, javascript click trapping, inlined style, attributes that aren't even VALID on IMG (like name), attributes that have no place in modern markup (Align)... much less the use of absolute positioning in a manner that given the size of that left and top probably means you shouldn't be using absolute positioning. (or are positioning it off the wrong element) Without seeing the rest of the page and what you are doing with it, I can't get more specific, but if that's indicative of the rest of the page, I'd have to go to my old standby of "throw it all away and start over with semantic markup, separation of presentation from content, and use of javascript to enhance functionality without replacing functionality". Again, FULL code or we can't help you. As in the WHOLE page and ALL it's files.