PC Review


Reply
Thread Tools Rate Thread

Centering images

 
 
Trevor L.
Guest
Posts: n/a
 
      14th May 2005
I resolved this many moons ago but now it has come back.

I made a few minor (I thought) changes to my HTML and my images are no
longer centred

This is the code:

<table>
<tr>
<td>
<span id="Image" align="center">
<img src="xxx.jpg" width="600" height="400" alt="Image" float="none">
</span>
</td>
</tr>
........

I tried align = "center" and float = "none" all to no avail - the image
will not centre :-8
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html


 
Reply With Quote
 
 
 
 
Murray
Guest
Posts: n/a
 
      14th May 2005
Spans do not align like that.

Try this -

<table>
<tr>
<td align="center">
<span id="Image">
<img src="xxx.jpg" width="600" height="400" alt="Image">
</span>
</td>
</tr>

You don't need the float:none.

--
Murray
============

"Trevor L." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I resolved this many moons ago but now it has come back.
>
> I made a few minor (I thought) changes to my HTML and my images are no
> longer centred
>
> This is the code:
>
> <table>
> <tr>
> <td>
> <span id="Image" align="center">
> <img src="xxx.jpg" width="600" height="400" alt="Image" float="none">
> </span>
> </td>
> </tr>
> .......
>
> I tried align = "center" and float = "none" all to no avail - the image
> will not centre :-8
> --
> Cheers,
> Trevor L.
> Website: http://tandcl.homemail.com.au
>
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>



 
Reply With Quote
 
Trevor L.
Guest
Posts: n/a
 
      15th May 2005
I thought it might be something like this.

I added the align="center" to the <td> tag, and it moved the image over a
bit to the right.

Actually what it does is center horizontal pictures , but vertical pictures
are aligned left to the same left point as the horizontal pictures (if that
makes sense).

That is, if the window is 600*600, a horizontal picture (540*360) is
vertically aligned to the top and horizontally aligned so that there is 30
gap on either side. A vertical picture (360*540) then is vertically aligned
to the top and horizontally aligned so that there is 30 gap on the left side
and 210 on the right side.

Do I need to add a <div> which is absolutely positioned, and alter the
positioning of the <div> depending on whether the picture is vertical or
horizontal. (This is part of a slide show so there are over 100 pictures at
the moment)
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Murray wrote:
> Spans do not align like that.
>
> Try this -
>
> <table>
> <tr>
> <td align="center">
> <span id="Image">
> <img src="xxx.jpg" width="600" height="400" alt="Image">
> </span>
> </td>
> </tr>
>
> You don't need the float:none.
>
>
> "Trevor L." <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> I resolved this many moons ago but now it has come back.
>>
>> I made a few minor (I thought) changes to my HTML and my images are
>> no longer centred
>>
>> This is the code:
>>
>> <table>
>> <tr>
>> <td>
>> <span id="Image" align="center">
>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>> float="none"> </span>
>> </td>
>> </tr>
>> .......
>>
>> I tried align = "center" and float = "none" all to no avail - the
>> image will not centre :-8
>> --
>> Cheers,
>> Trevor L.
>> Website: http://tandcl.homemail.com.au
>>
>>
>> I choose Polesoft Lockspam to fight spam, and you?
>> http://www.polesoft.com/refer.html



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      15th May 2005
Have are you setting the alignment, on the image, the toolbar alignment icon or the cell properties?

Suggest using the cell properties only.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

"Trevor L." <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>I thought it might be something like this.
>
> I added the align="center" to the <td> tag, and it moved the image over a bit to the right.
>
> Actually what it does is center horizontal pictures , but vertical pictures are aligned left to
> the same left point as the horizontal pictures (if that makes sense).
>
> That is, if the window is 600*600, a horizontal picture (540*360) is vertically aligned to the top
> and horizontally aligned so that there is 30 gap on either side. A vertical picture (360*540) then
> is vertically aligned to the top and horizontally aligned so that there is 30 gap on the left side
> and 210 on the right side.
>
> Do I need to add a <div> which is absolutely positioned, and alter the positioning of the <div>
> depending on whether the picture is vertical or horizontal. (This is part of a slide show so there
> are over 100 pictures at the moment)
> --
> Cheers,
> Trevor L.
> Website: http://tandcl.homemail.com.au
>
> Murray wrote:
>> Spans do not align like that.
>>
>> Try this -
>>
>> <table>
>> <tr>
>> <td align="center">
>> <span id="Image">
>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>> </span>
>> </td>
>> </tr>
>>
>> You don't need the float:none.
>>
>>
>> "Trevor L." <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> I resolved this many moons ago but now it has come back.
>>>
>>> I made a few minor (I thought) changes to my HTML and my images are
>>> no longer centred
>>>
>>> This is the code:
>>>
>>> <table>
>>> <tr>
>>> <td>
>>> <span id="Image" align="center">
>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>> float="none"> </span>
>>> </td>
>>> </tr>
>>> .......
>>>
>>> I tried align = "center" and float = "none" all to no avail - the
>>> image will not centre :-8
>>> --
>>> Cheers,
>>> Trevor L.
>>> Website: http://tandcl.homemail.com.au
>>>
>>>
>>> I choose Polesoft Lockspam to fight spam, and you?
>>> http://www.polesoft.com/refer.html

>
>



 
Reply With Quote
 
Trevor L.
Guest
Posts: n/a
 
      15th May 2005
Thomas,
Thanks for the reply.

I am not using FP directly for the particular page because it is called via
Spawn from another page.

However, after Murray's suggestion, I altered the <td> tag, so I guess it is
cell properties.
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Thomas A. Rowe wrote:
> Have are you setting the alignment, on the image, the toolbar
> alignment icon or the cell properties?
> Suggest using the cell properties only.
>
>
> "Trevor L." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I thought it might be something like this.
>>
>> I added the align="center" to the <td> tag, and it moved the image
>> over a bit to the right. Actually what it does is center horizontal
>> pictures , but vertical
>> pictures are aligned left to the same left point as the horizontal
>> pictures (if that makes sense). That is, if the window is 600*600, a
>> horizontal picture (540*360) is
>> vertically aligned to the top and horizontally aligned so that there
>> is 30 gap on either side. A vertical picture (360*540) then is
>> vertically aligned to the top and horizontally aligned so that there
>> is 30 gap on the left side and 210 on the right side. Do I need to add a
>> <div> which is absolutely positioned, and alter
>> the positioning of the <div> depending on whether the picture is
>> vertical or horizontal. (This is part of a slide show so there are
>> over 100 pictures at the moment) --
>> Cheers,
>> Trevor L.
>> Website: http://tandcl.homemail.com.au
>>
>> Murray wrote:
>>> Spans do not align like that.
>>>
>>> Try this -
>>>
>>> <table>
>>> <tr>
>>> <td align="center">
>>> <span id="Image">
>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>> </span>
>>> </td>
>>> </tr>
>>>
>>> You don't need the float:none.
>>>
>>>
>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> I resolved this many moons ago but now it has come back.
>>>>
>>>> I made a few minor (I thought) changes to my HTML and my images are
>>>> no longer centred
>>>>
>>>> This is the code:
>>>>
>>>> <table>
>>>> <tr>
>>>> <td>
>>>> <span id="Image" align="center">
>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>> float="none"> </span>
>>>> </td>
>>>> </tr>
>>>> .......
>>>>
>>>> I tried align = "center" and float = "none" all to no avail - the
>>>> image will not centre :-8
>>>> --
>>>> Cheers,
>>>> Trevor L.
>>>> Website: http://tandcl.homemail.com.au
>>>>
>>>>
>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>> http://www.polesoft.com/refer.html



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      15th May 2005
But aren't you loading a page into the window create by Spawn with the image on the page?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

"Trevor L." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Thomas,
> Thanks for the reply.
>
> I am not using FP directly for the particular page because it is called via Spawn from another
> page.
>
> However, after Murray's suggestion, I altered the <td> tag, so I guess it is cell properties.
> --
> Cheers,
> Trevor L.
> Website: http://tandcl.homemail.com.au
>
> Thomas A. Rowe wrote:
>> Have are you setting the alignment, on the image, the toolbar
>> alignment icon or the cell properties?
>> Suggest using the cell properties only.
>>
>>
>> "Trevor L." <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I thought it might be something like this.
>>>
>>> I added the align="center" to the <td> tag, and it moved the image
>>> over a bit to the right. Actually what it does is center horizontal pictures , but vertical
>>> pictures are aligned left to the same left point as the horizontal
>>> pictures (if that makes sense). That is, if the window is 600*600, a horizontal picture
>>> (540*360) is
>>> vertically aligned to the top and horizontally aligned so that there
>>> is 30 gap on either side. A vertical picture (360*540) then is
>>> vertically aligned to the top and horizontally aligned so that there
>>> is 30 gap on the left side and 210 on the right side. Do I need to add a <div> which is
>>> absolutely positioned, and alter
>>> the positioning of the <div> depending on whether the picture is
>>> vertical or horizontal. (This is part of a slide show so there are
>>> over 100 pictures at the moment) --
>>> Cheers,
>>> Trevor L.
>>> Website: http://tandcl.homemail.com.au
>>>
>>> Murray wrote:
>>>> Spans do not align like that.
>>>>
>>>> Try this -
>>>>
>>>> <table>
>>>> <tr>
>>>> <td align="center">
>>>> <span id="Image">
>>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>>> </span>
>>>> </td>
>>>> </tr>
>>>>
>>>> You don't need the float:none.
>>>>
>>>>
>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>> I resolved this many moons ago but now it has come back.
>>>>>
>>>>> I made a few minor (I thought) changes to my HTML and my images are
>>>>> no longer centred
>>>>>
>>>>> This is the code:
>>>>>
>>>>> <table>
>>>>> <tr>
>>>>> <td>
>>>>> <span id="Image" align="center">
>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>>> float="none"> </span>
>>>>> </td>
>>>>> </tr>
>>>>> .......
>>>>>
>>>>> I tried align = "center" and float = "none" all to no avail - the
>>>>> image will not centre :-8
>>>>> --
>>>>> Cheers,
>>>>> Trevor L.
>>>>> Website: http://tandcl.homemail.com.au
>>>>>
>>>>>
>>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>>> http://www.polesoft.com/refer.html

>
>



 
Reply With Quote
 
Trevor L.
Guest
Posts: n/a
 
      15th May 2005
Yes, I am, by this code
<input type="button" value="Slideshow - Family"
onclick= "spawnJimcoPopup ('slideshow.html .................;return
false;">

In slideshow.html I have the code

<table>
<tr>
<td align="center">
<span id="Image">...</span>
</td>
</tr>

<tr>
<td>
<span id="ImgText">..</span>
</td>
</tr>

and then buttons such as
<input type="button"
value="Next >>"
onclick="chgImg(1)">

The function chgImg() receives the parameter and derives ImgNum from it.
It then has the code
var w, h
if (Pictures[ImgNum].substr(0,1) == 'H')
{ w="540"; h="360" }
else if (Pictures[ImgNum].substr(0,1) == 'V')
{ w="360"; h="540" }
else // square
{ w="440"; h="440" }

document.getElementById('Image').innerHTML =
'<img src="' + Slides[ImgNum]
+ '" width="' + w + '" height="' + h
+ '" alt="Image">'

document.getElementById('ImgText').innerHTML =
(ImgNum + 1) + '/' + Captions.length + ' ' + Captions[ImgNum]

Slides and Captions are arrays containing filenames and captions
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Thomas A. Rowe wrote:
> But aren't you loading a page into the window create by Spawn with
> the image on the page?
>
> "Trevor L." <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Thomas,
>> Thanks for the reply.
>>
>> I am not using FP directly for the particular page because it is
>> called via Spawn from another page.
>>
>> However, after Murray's suggestion, I altered the <td> tag, so I
>> guess it is cell properties. --
>> Cheers,
>> Trevor L.
>> Website: http://tandcl.homemail.com.au
>>
>> Thomas A. Rowe wrote:
>>> Have are you setting the alignment, on the image, the toolbar
>>> alignment icon or the cell properties?
>>> Suggest using the cell properties only.
>>>
>>>
>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> I thought it might be something like this.
>>>>
>>>> I added the align="center" to the <td> tag, and it moved the image
>>>> over a bit to the right. Actually what it does is center
>>>> horizontal pictures , but vertical pictures are aligned left to
>>>> the same left point as the horizontal pictures (if that makes sense).
>>>> That is, if the window is 600*600,
>>>> a horizontal picture (540*360) is
>>>> vertically aligned to the top and horizontally aligned so that
>>>> there is 30 gap on either side. A vertical picture (360*540) then is
>>>> vertically aligned to the top and horizontally aligned so that
>>>> there is 30 gap on the left side and 210 on the right side. Do I need
>>>> to
>>>> add a <div> which is absolutely positioned, and alter
>>>> the positioning of the <div> depending on whether the picture is
>>>> vertical or horizontal. (This is part of a slide show so there are
>>>> over 100 pictures at the moment) --
>>>> Cheers,
>>>> Trevor L.
>>>> Website: http://tandcl.homemail.com.au
>>>>
>>>> Murray wrote:
>>>>> Spans do not align like that.
>>>>>
>>>>> Try this -
>>>>>
>>>>> <table>
>>>>> <tr>
>>>>> <td align="center">
>>>>> <span id="Image">
>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>>>> </span>
>>>>> </td>
>>>>> </tr>
>>>>>
>>>>> You don't need the float:none.
>>>>>
>>>>>
>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>> news:%(E-Mail Removed)...
>>>>>> I resolved this many moons ago but now it has come back.
>>>>>>
>>>>>> I made a few minor (I thought) changes to my HTML and my images
>>>>>> are no longer centred
>>>>>>
>>>>>> This is the code:
>>>>>>
>>>>>> <table>
>>>>>> <tr>
>>>>>> <td>
>>>>>> <span id="Image" align="center">
>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>>>> float="none"> </span>
>>>>>> </td>
>>>>>> </tr>
>>>>>> .......
>>>>>>
>>>>>> I tried align = "center" and float = "none" all to no avail -
>>>>>> the image will not centre :-8
>>>>>> --
>>>>>> Cheers,
>>>>>> Trevor L.
>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>
>>>>>>
>>>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>>>> http://www.polesoft.com/refer.html



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      15th May 2005
Tighten up your table, by making sure the </td> on the same line as the end of your cell content,
like so (you can remove the valign="middle" if you don't want center vertically in the cell):


<table>
<tr>
<td valign="middle" align="center"><span id="Image">...</span></td>
</tr>
<tr>
<td valign="middle" align="center"><span id="ImgText">..</span></td>
</tr>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

"Trevor L." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Yes, I am, by this code
> <input type="button" value="Slideshow - Family"
> onclick= "spawnJimcoPopup ('slideshow.html .................;return false;">
>
> In slideshow.html I have the code
>
> <table>
> <tr>
> <td align="center">
> <span id="Image">...</span>
> </td>
> </tr>
>
> <tr>
> <td>
> <span id="ImgText">..</span>
> </td>
> </tr>
>
> and then buttons such as
> <input type="button"
> value="Next >>"
> onclick="chgImg(1)">
>
> The function chgImg() receives the parameter and derives ImgNum from it.
> It then has the code
> var w, h
> if (Pictures[ImgNum].substr(0,1) == 'H')
> { w="540"; h="360" }
> else if (Pictures[ImgNum].substr(0,1) == 'V')
> { w="360"; h="540" }
> else // square
> { w="440"; h="440" }
>
> document.getElementById('Image').innerHTML =
> '<img src="' + Slides[ImgNum]
> + '" width="' + w + '" height="' + h
> + '" alt="Image">'
>
> document.getElementById('ImgText').innerHTML =
> (ImgNum + 1) + '/' + Captions.length + ' ' + Captions[ImgNum]
>
> Slides and Captions are arrays containing filenames and captions
> --
> Cheers,
> Trevor L.
> Website: http://tandcl.homemail.com.au
>
> Thomas A. Rowe wrote:
>> But aren't you loading a page into the window create by Spawn with
>> the image on the page?
>>
>> "Trevor L." <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Thomas,
>>> Thanks for the reply.
>>>
>>> I am not using FP directly for the particular page because it is
>>> called via Spawn from another page.
>>>
>>> However, after Murray's suggestion, I altered the <td> tag, so I
>>> guess it is cell properties. --
>>> Cheers,
>>> Trevor L.
>>> Website: http://tandcl.homemail.com.au
>>>
>>> Thomas A. Rowe wrote:
>>>> Have are you setting the alignment, on the image, the toolbar
>>>> alignment icon or the cell properties?
>>>> Suggest using the cell properties only.
>>>>
>>>>
>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> I thought it might be something like this.
>>>>>
>>>>> I added the align="center" to the <td> tag, and it moved the image
>>>>> over a bit to the right. Actually what it does is center
>>>>> horizontal pictures , but vertical pictures are aligned left to
>>>>> the same left point as the horizontal pictures (if that makes sense). That is, if the window
>>>>> is 600*600,
>>>>> a horizontal picture (540*360) is
>>>>> vertically aligned to the top and horizontally aligned so that
>>>>> there is 30 gap on either side. A vertical picture (360*540) then is
>>>>> vertically aligned to the top and horizontally aligned so that
>>>>> there is 30 gap on the left side and 210 on the right side. Do I need to
>>>>> add a <div> which is absolutely positioned, and alter
>>>>> the positioning of the <div> depending on whether the picture is
>>>>> vertical or horizontal. (This is part of a slide show so there are
>>>>> over 100 pictures at the moment) --
>>>>> Cheers,
>>>>> Trevor L.
>>>>> Website: http://tandcl.homemail.com.au
>>>>>
>>>>> Murray wrote:
>>>>>> Spans do not align like that.
>>>>>>
>>>>>> Try this -
>>>>>>
>>>>>> <table>
>>>>>> <tr>
>>>>>> <td align="center">
>>>>>> <span id="Image">
>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>>>>> </span>
>>>>>> </td>
>>>>>> </tr>
>>>>>>
>>>>>> You don't need the float:none.
>>>>>>
>>>>>>
>>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>>> news:%(E-Mail Removed)...
>>>>>>> I resolved this many moons ago but now it has come back.
>>>>>>>
>>>>>>> I made a few minor (I thought) changes to my HTML and my images
>>>>>>> are no longer centred
>>>>>>>
>>>>>>> This is the code:
>>>>>>>
>>>>>>> <table>
>>>>>>> <tr>
>>>>>>> <td>
>>>>>>> <span id="Image" align="center">
>>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>>>>> float="none"> </span>
>>>>>>> </td>
>>>>>>> </tr>
>>>>>>> .......
>>>>>>>
>>>>>>> I tried align = "center" and float = "none" all to no avail -
>>>>>>> the image will not centre :-8
>>>>>>> --
>>>>>>> Cheers,
>>>>>>> Trevor L.
>>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>>
>>>>>>>
>>>>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>>>>> http://www.polesoft.com/refer.html

>
>



 
Reply With Quote
 
Trevor L.
Guest
Posts: n/a
 
      15th May 2005
Thomas,
Thanks, I have done that (valign changed).

Horozontal images align perfectly. If I widen the window, the gap on either
side increases. But vertical pictures align to the same left margin as
horizontal pictures and part of the top is cut off.

Mystified :-?
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Thomas A. Rowe wrote:
> Tighten up your table, by making sure the </td> on the same line as
> the end of your cell content, like so (you can remove the
> valign="middle" if you don't want center vertically in the cell):
>
> <table>
> <tr>
> <td valign="middle" align="center"><span id="Image">...</span></td>
> </tr>
> <tr>
> <td valign="middle" align="center"><span
> id="ImgText">..</span></td> </tr>
>
>
> "Trevor L." <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Yes, I am, by this code
>> <input type="button" value="Slideshow - Family"
>> onclick= "spawnJimcoPopup ('slideshow.html
>> .................;return false;"> In slideshow.html I have the code
>>
>> <table>
>> <tr>
>> <td align="center">
>> <span id="Image">...</span>
>> </td>
>> </tr>
>>
>> <tr>
>> <td>
>> <span id="ImgText">..</span>
>> </td>
>> </tr>
>>
>> and then buttons such as
>> <input type="button"
>> value="Next >>"
>> onclick="chgImg(1)">
>>
>> The function chgImg() receives the parameter and derives ImgNum from
>> it. It then has the code
>> var w, h
>> if (Pictures[ImgNum].substr(0,1) == 'H')
>> { w="540"; h="360" }
>> else if (Pictures[ImgNum].substr(0,1) == 'V')
>> { w="360"; h="540" }
>> else // square
>> { w="440"; h="440" }
>>
>> document.getElementById('Image').innerHTML =
>> '<img src="' + Slides[ImgNum]
>> + '" width="' + w + '" height="' + h
>> + '" alt="Image">'
>>
>> document.getElementById('ImgText').innerHTML =
>> (ImgNum + 1) + '/' + Captions.length + ' ' + Captions[ImgNum]
>>
>> Slides and Captions are arrays containing filenames and captions
>> --
>> Cheers,
>> Trevor L.
>> Website: http://tandcl.homemail.com.au
>>
>> Thomas A. Rowe wrote:
>>> But aren't you loading a page into the window create by Spawn with
>>> the image on the page?
>>>
>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> Thomas,
>>>> Thanks for the reply.
>>>>
>>>> I am not using FP directly for the particular page because it is
>>>> called via Spawn from another page.
>>>>
>>>> However, after Murray's suggestion, I altered the <td> tag, so I
>>>> guess it is cell properties. --
>>>> Cheers,
>>>> Trevor L.
>>>> Website: http://tandcl.homemail.com.au
>>>>
>>>> Thomas A. Rowe wrote:
>>>>> Have are you setting the alignment, on the image, the toolbar
>>>>> alignment icon or the cell properties?
>>>>> Suggest using the cell properties only.
>>>>>
>>>>>
>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>> I thought it might be something like this.
>>>>>>
>>>>>> I added the align="center" to the <td> tag, and it moved the
>>>>>> image over a bit to the right. Actually what it does is center
>>>>>> horizontal pictures , but vertical pictures are aligned left to
>>>>>> the same left point as the horizontal pictures (if that makes
>>>>>> sense). That is, if the window is 600*600,
>>>>>> a horizontal picture (540*360) is
>>>>>> vertically aligned to the top and horizontally aligned so that
>>>>>> there is 30 gap on either side. A vertical picture (360*540)
>>>>>> then is vertically aligned to the top and horizontally aligned so
>>>>>> that
>>>>>> there is 30 gap on the left side and 210 on the right side. Do I
>>>>>> need to add a <div> which is absolutely positioned, and alter
>>>>>> the positioning of the <div> depending on whether the picture is
>>>>>> vertical or horizontal. (This is part of a slide show so there
>>>>>> are over 100 pictures at the moment) --
>>>>>> Cheers,
>>>>>> Trevor L.
>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>
>>>>>> Murray wrote:
>>>>>>> Spans do not align like that.
>>>>>>>
>>>>>>> Try this -
>>>>>>>
>>>>>>> <table>
>>>>>>> <tr>
>>>>>>> <td align="center">
>>>>>>> <span id="Image">
>>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>>>>>> </span>
>>>>>>> </td>
>>>>>>> </tr>
>>>>>>>
>>>>>>> You don't need the float:none.
>>>>>>>
>>>>>>>
>>>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>>>> news:%(E-Mail Removed)...
>>>>>>>> I resolved this many moons ago but now it has come back.
>>>>>>>>
>>>>>>>> I made a few minor (I thought) changes to my HTML and my images
>>>>>>>> are no longer centred
>>>>>>>>
>>>>>>>> This is the code:
>>>>>>>>
>>>>>>>> <table>
>>>>>>>> <tr>
>>>>>>>> <td>
>>>>>>>> <span id="Image" align="center">
>>>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>>>>>> float="none"> </span>
>>>>>>>> </td>
>>>>>>>> </tr>
>>>>>>>> .......
>>>>>>>>
>>>>>>>> I tried align = "center" and float = "none" all to no avail -
>>>>>>>> the image will not centre :-8
>>>>>>>> --
>>>>>>>> Cheers,
>>>>>>>> Trevor L.
>>>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>>>
>>>>>>>>
>>>>>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>>>>>> http://www.polesoft.com/refer.html



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      15th May 2005
Are you floating these images, or do you have some unmentioned CSS affecting
them?

--
Murray
============

"Trevor L." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thomas,
> Thanks, I have done that (valign changed).
>
> Horozontal images align perfectly. If I widen the window, the gap on
> either side increases. But vertical pictures align to the same left margin
> as horizontal pictures and part of the top is cut off.
>
> Mystified :-?
> --
> Cheers,
> Trevor L.
> Website: http://tandcl.homemail.com.au
>
> Thomas A. Rowe wrote:
>> Tighten up your table, by making sure the </td> on the same line as
>> the end of your cell content, like so (you can remove the
>> valign="middle" if you don't want center vertically in the cell):
>>
>> <table>
>> <tr>
>> <td valign="middle" align="center"><span id="Image">...</span></td>
>> </tr>
>> <tr>
>> <td valign="middle" align="center"><span
>> id="ImgText">..</span></td> </tr>
>>
>>
>> "Trevor L." <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Yes, I am, by this code
>>> <input type="button" value="Slideshow - Family"
>>> onclick= "spawnJimcoPopup ('slideshow.html
>>> .................;return false;"> In slideshow.html I have the code
>>>
>>> <table>
>>> <tr>
>>> <td align="center">
>>> <span id="Image">...</span>
>>> </td>
>>> </tr>
>>>
>>> <tr>
>>> <td>
>>> <span id="ImgText">..</span>
>>> </td>
>>> </tr>
>>>
>>> and then buttons such as
>>> <input type="button"
>>> value="Next >>"
>>> onclick="chgImg(1)">
>>>
>>> The function chgImg() receives the parameter and derives ImgNum from
>>> it. It then has the code
>>> var w, h
>>> if (Pictures[ImgNum].substr(0,1) == 'H')
>>> { w="540"; h="360" }
>>> else if (Pictures[ImgNum].substr(0,1) == 'V')
>>> { w="360"; h="540" }
>>> else // square
>>> { w="440"; h="440" }
>>>
>>> document.getElementById('Image').innerHTML =
>>> '<img src="' + Slides[ImgNum]
>>> + '" width="' + w + '" height="' + h
>>> + '" alt="Image">'
>>>
>>> document.getElementById('ImgText').innerHTML =
>>> (ImgNum + 1) + '/' + Captions.length + ' ' + Captions[ImgNum]
>>>
>>> Slides and Captions are arrays containing filenames and captions
>>> --
>>> Cheers,
>>> Trevor L.
>>> Website: http://tandcl.homemail.com.au
>>>
>>> Thomas A. Rowe wrote:
>>>> But aren't you loading a page into the window create by Spawn with
>>>> the image on the page?
>>>>
>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>> Thomas,
>>>>> Thanks for the reply.
>>>>>
>>>>> I am not using FP directly for the particular page because it is
>>>>> called via Spawn from another page.
>>>>>
>>>>> However, after Murray's suggestion, I altered the <td> tag, so I
>>>>> guess it is cell properties. --
>>>>> Cheers,
>>>>> Trevor L.
>>>>> Website: http://tandcl.homemail.com.au
>>>>>
>>>>> Thomas A. Rowe wrote:
>>>>>> Have are you setting the alignment, on the image, the toolbar
>>>>>> alignment icon or the cell properties?
>>>>>> Suggest using the cell properties only.
>>>>>>
>>>>>>
>>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>>> news:(E-Mail Removed)...
>>>>>>> I thought it might be something like this.
>>>>>>>
>>>>>>> I added the align="center" to the <td> tag, and it moved the
>>>>>>> image over a bit to the right. Actually what it does is center
>>>>>>> horizontal pictures , but vertical pictures are aligned left to
>>>>>>> the same left point as the horizontal pictures (if that makes
>>>>>>> sense). That is, if the window is 600*600,
>>>>>>> a horizontal picture (540*360) is
>>>>>>> vertically aligned to the top and horizontally aligned so that
>>>>>>> there is 30 gap on either side. A vertical picture (360*540)
>>>>>>> then is vertically aligned to the top and horizontally aligned so
>>>>>>> that
>>>>>>> there is 30 gap on the left side and 210 on the right side. Do I
>>>>>>> need to add a <div> which is absolutely positioned, and alter
>>>>>>> the positioning of the <div> depending on whether the picture is
>>>>>>> vertical or horizontal. (This is part of a slide show so there
>>>>>>> are over 100 pictures at the moment) --
>>>>>>> Cheers,
>>>>>>> Trevor L.
>>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>>
>>>>>>> Murray wrote:
>>>>>>>> Spans do not align like that.
>>>>>>>>
>>>>>>>> Try this -
>>>>>>>>
>>>>>>>> <table>
>>>>>>>> <tr>
>>>>>>>> <td align="center">
>>>>>>>> <span id="Image">
>>>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image">
>>>>>>>> </span>
>>>>>>>> </td>
>>>>>>>> </tr>
>>>>>>>>
>>>>>>>> You don't need the float:none.
>>>>>>>>
>>>>>>>>
>>>>>>>> "Trevor L." <(E-Mail Removed)> wrote in message
>>>>>>>> news:%(E-Mail Removed)...
>>>>>>>>> I resolved this many moons ago but now it has come back.
>>>>>>>>>
>>>>>>>>> I made a few minor (I thought) changes to my HTML and my images
>>>>>>>>> are no longer centred
>>>>>>>>>
>>>>>>>>> This is the code:
>>>>>>>>>
>>>>>>>>> <table>
>>>>>>>>> <tr>
>>>>>>>>> <td>
>>>>>>>>> <span id="Image" align="center">
>>>>>>>>> <img src="xxx.jpg" width="600" height="400" alt="Image"
>>>>>>>>> float="none"> </span>
>>>>>>>>> </td>
>>>>>>>>> </tr>
>>>>>>>>> .......
>>>>>>>>>
>>>>>>>>> I tried align = "center" and float = "none" all to no avail -
>>>>>>>>> the image will not centre :-8
>>>>>>>>> --
>>>>>>>>> Cheers,
>>>>>>>>> Trevor L.
>>>>>>>>> Website: http://tandcl.homemail.com.au
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I choose Polesoft Lockspam to fight spam, and you?
>>>>>>>>> http://www.polesoft.com/refer.html

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering images on PowerPoint slides Spin Microsoft Powerpoint 1 8th Mar 2008 01:26 AM
Centering images in 'My Pictures Slideshow'. Jon Mitchell Windows XP Customization 0 29th Nov 2007 03:55 PM
centering div within a div Steve Richter Microsoft ASP .NET 4 17th Jul 2007 12:27 AM
centering =?Utf-8?B?RG9ubmEgRy4=?= Microsoft Word Document Management 2 21st May 2007 10:12 PM
Centering Images or making the image frame auto adjust to image size Julie Nicole Microsoft Access Getting Started 4 28th Jul 2004 06:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:13 PM.