I have a school homework problem that I don’t understand. I need to use the screen object to be able to get the size of a user’s screen, then I need to use that information to be able to place an image using dynamic positioning in the middle of the page.
So far, all I have been able to do is get the user’s screen size. I know I need to use position:absolute but I’m unsure of the syntax and how to combine it all together. I upload my sites and images on geocities, if that makes any difference as to the syntax of where my image is located.
Here’s all I have (minus the < and > tags) and if someone could help me with the syntax, it would be much appreciated:
?xml version “1.0”?
!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“
html xmlns = “
head
title>B Search</title
script type = “text/javascript”
var scrwidth = screen.width;
var scrheith = screen.height;
img src = “birds01.jpeg”; position: absolute;
/script
/head
body
/body
/html