Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Position image x,y in html

 
Thread Tools Search this Thread
Old 11-04-2009, 02:20 PM   #1
Default Position image x,y in html


Hi,

We have a monitoring page on a specific computer where we need some
differently sized images accurately positioned. Hence there is no
compatibility issues. One computer, one browser.

How do we place imageA.gif at x=500 Y=200? (from the upper left corner
of the screen) At its native pixel size.

Thanks for tips on this

regards

geir


Geir
  Reply With Quote
Old 11-04-2009, 02:55 PM   #2
Adrienne Boswell
 
Posts: n/a
Default Re: Position image x,y in html
Gazing into my crystal ball I observed Geir <> writing
in news::

> Hi,
>
> We have a monitoring page on a specific computer where we need some
> differently sized images accurately positioned. Hence there is no
> compatibility issues. One computer, one browser.
>
> How do we place imageA.gif at x=500 Y=200? (from the upper left corner
> of the screen) At its native pixel size.
>
> Thanks for tips on this
>
> regards
>
> geir
>


Look at the CSS position property.


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share



Adrienne Boswell
  Reply With Quote
Old 11-04-2009, 09:28 PM   #3
Nik Coughlin
 
Posts: n/a
Default Re: Position image x,y in html
"Geir" <> wrote in message
news:...
> Hi,
>
> We have a monitoring page on a specific computer where we need some
> differently sized images accurately positioned. Hence there is no
> compatibility issues. One computer, one browser.
>
> How do we place imageA.gif at x=500 Y=200? (from the upper left corner of
> the screen) At its native pixel size.
>
> Thanks for tips on this


<!DOCTYPE HTML>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Position imageA</title>
<style type="text/css">
.imageA {
position: absolute;
left: 500px;
top: 200px;
}
</style>
</head>
<body>
<img src="imageA.gif" class="imageA" alt="meaningful alt text">
</body>
</html>





Nik Coughlin
  Reply With Quote
Old 11-05-2009, 10:55 PM   #4
Nik Coughlin
 
Posts: n/a
Default Re: Position image x,y in html
"Ben C" <> wrote in message
news:...
> On 2009-11-04, Nik Coughlin <> wrote:
>> "Geir" <> wrote in message
>> news:...
>>> Hi,
>>>
>>> We have a monitoring page on a specific computer where we need some
>>> differently sized images accurately positioned. Hence there is no
>>> compatibility issues. One computer, one browser.
>>>
>>> How do we place imageA.gif at x=500 Y=200? (from the upper left corner
>>> of
>>> the screen) At its native pixel size.
>>>
>>> Thanks for tips on this

>>
>><!DOCTYPE HTML>
>><html>
>> <head>
>> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
>> <title>Position imageA</title>
>> <style type="text/css">
>> .imageA {
>> position: absolute;
>> left: 500px;
>> top: 200px;
>> }
>> </style>
>> </head>
>> <body>
>> <img src="imageA.gif" class="imageA" alt="meaningful alt text">
>> </body>
>></html>

>
> Yes, although this is invalid-- not supposed to have an IMG just inside
> BODY like that. Put a DIV around it.


Nope, perfectly valid, look at the doctype. But your advice is good for the
OP who is probably not authoring as HTML 5



Nik Coughlin
  Reply With Quote
Old 11-05-2009, 11:00 PM   #5
Nik Coughlin
 
Posts: n/a
Default Re: Position image x,y in html
"Nik Coughlin" <> wrote in message
news:hcvl58$446$...
> "Ben C" <> wrote in message
> news:...
>> On 2009-11-04, Nik Coughlin <> wrote:
>>>
>>><!DOCTYPE HTML>
>>><html>
>>> <head>
>>> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
>>> <title>Position imageA</title>
>>> <style type="text/css">
>>> .imageA {
>>> position: absolute;
>>> left: 500px;
>>> top: 200px;
>>> }
>>> </style>
>>> </head>
>>> <body>
>>> <img src="imageA.gif" class="imageA" alt="meaningful alt text">
>>> </body>
>>></html>

>>
>> Yes, although this is invalid-- not supposed to have an IMG just inside
>> BODY like that. Put a DIV around it.

>
> Nope, perfectly valid, look at the doctype. But your advice is good for
> the OP who is probably not authoring as HTML 5


In fact, this is valid HTML5 (provided that the server is sending character
encoding or the file has a Unicode BOM):

<!DOCTYPE HTML>
<title>Position imageA</title>
<style type="text/css">
.imageA {
position: absolute;
left: 500px;
top: 200px;
}
</style>
<img src="bigger.png" class="imageA" alt="meantingful alt text">



Nik Coughlin
  Reply With Quote
Old 11-05-2009, 11:09 PM   #6
Travis Newbury
 
Posts: n/a
Default Re: Position image x,y in html
On Nov 4, 9:20*am, Geir <gei...@gmail.com> wrote:
> ...Hence there is no
> compatibility issues. *One computer, one browser.


> How do we place imageA.gif at x=500 Y=200? (from the upper left corner
> of the screen) *At its native pixel size.



Does anyone "really" believe this is running this on a single system
with a single browser? Come on... They just know everyone will give
them crap about trying to make it look exactly like they want if they
did not put that in there...

That said, I think it is perfectly all right to have such a page and
they should look at CSS absolute positioning....


Travis Newbury
  Reply With Quote
Old 11-06-2009, 12:51 PM   #7
Beauregard T. Shagnasty
 
Posts: n/a
Default Re: Position image x,y in html
Ben C wrote:

> On 2009-11-05, Nik Coughlin <> wrote:
>>>> <!DOCTYPE HTML>
>>>> <html> ...
>>>
>>> Yes, although this is invalid-- not supposed to have an IMG just
>>> inside BODY like that. Put a DIV around it.

>>
>> Nope, perfectly valid, look at the doctype. But your advice is good
>> for the OP who is probably not authoring as HTML 5

>
> I was curious about the doctype. So that's an HTML 5 doctype?


Sending Nik's sample to the validator produces this:

" Using experimental feature: HTML5 Conformance Checker.

The validator checked your document with an experimental feature: HTML5
Conformance Checker. This feature has been made available for your
convenience, but be aware that it may be unreliable, or not perfectly up
to date with the latest development of some cutting-edge technologies."

Personally, I wouldn't use HTML5 until it is listed here:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

--
-bts
-but that's just me...


Beauregard T. Shagnasty
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fish Tank Gravel Andregg@prudence.com Computer Information 0 05-21-2009 05:36 AM
Hdtv Recorder Archey@lurlene.com Wireless Networking 0 05-17-2009 12:18 PM
Canon Powershot Sd750 Digital Camera Alrod@issac.com Computer Security 0 05-17-2009 02:39 AM
Acronis True Image 9 burning to DVD questions All Things Mopar Computer Support 14 02-19-2006 03:18 AM
Burning CD's (Long - error log included) fiddaman64 Computer Support 11 05-11-2005 01:49 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46