Jump to content

Same objects' position on all screen resolutions

- - - - -

  • Please log in to reply
1 reply to this topic

#1
toto_7

toto_7

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 295 posts
Hi there,

I am wondering how is possible to build up an HTML page and to be sure that the position that your images etc. have to be the same on every resolution. More specific my machine's resolution is 1280 x 800 how I can be 100% sure that the image I have in my code will placed at the same place on every user's screen?

Thanks in advance,
toto_7

"Programming is like sex. One mistake and you have to support it for the rest of your life."

-Michael Sinz

#2
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
<div style="position: absolute; left: 400px; top: 500px;">Hello World!</div>
or...
<div id="some_div">Hello World!</div> 

<script type="text/javascript"> 

var the_div= document.getElementById ("some_div"); 

the_div.style.position= "absolute"; 

the_div.style.left= 400; 

the_div.style.top= 500; 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users