Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Same objects' position on all screen resolutions

  • Please log in to reply
1 reply to this topic

#1 toto_7


    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 244 posts

Posted 24 January 2012 - 04:13 PM

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,
  • 0

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

-Michael Sinz

#2 RhetoricalRuvim


    JavaScript Programmer

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1311 posts
  • Location:C:\Countries\US
  • Programming Language:C, Java, C++, PHP, Python, JavaScript

Posted 24 January 2012 - 04:23 PM

<div style="position: absolute; left: 400px; top: 500px;">Hello World!</div>
<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;

  • 0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download