# OT: Math help - ASP.NET General

Just divide the width of the page by 2. Then divide the width of the image by 2. Then subtract the length of half of the image from the length of half of the page. This should give you your starting x coordinate. Same thing for the height. I'm assuming that the coordinate system for the image (0,0) is at the top left of the image. Hope that helps. "Mark" <markN0SPAM> wrote in message news:bgrnlh\$d0a\$1lust.ihug.co.nz... > Hi all, I have a small math problem I am hoping someone can help me with. > > Basically I have to align an ...

1. ## Re: Math help

Just divide the width of the page by 2. Then divide the width of the image
by 2. Then subtract the length of half of the image from the length of half
of the page. This should give you your starting x coordinate. Same thing
for the height. I'm assuming that the coordinate system for the image (0,0)
is at the top left of the image. Hope that helps.

"Mark" <markN0SPAM> wrote in message
news:bgrnlh\$d0a\$1lust.ihug.co.nz...
> Hi all, I have a small math problem I am hoping someone can help me with.
>
> Basically I have to align an image in the middle of a page but I have to
> specify the left coordinate for the image.
>
> I know the width of the page as well as the width of the image so I just
> need to work out how far in from the left of the page to specify the image
> starting point so the image is aligned in the center.
>
> Help appreciated :)
>
> Cheers
> Mark
>
>

Joseph D. DeJohn Guest

2. ## OT: Math help

Hi all, I have a small math problem I am hoping someone can help me with.

Basically I have to align an image in the middle of a page but I have to
specify the left coordinate for the image.

I know the width of the page as well as the width of the image so I just
need to work out how far in from the left of the page to specify the image
starting point so the image is aligned in the center.

Help appreciated :)

Cheers
Mark

Mark Guest

3. ## Re: Math help

Cheers everyone, thanks for your help
Regards
Mark

Mark Guest

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•