Click to See Complete Forum and Search --> : [RESOLVED] What can I use instead of align = "center" ?


DaveinLondon
09-11-2006, 10:39 AM
I want my page to validate properly and
4.01 does like : align = "center" :confused:

How do I get this link to be centered in my table ?

<table width="190px" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<script type="text/javascript" src="http://www.bluehost.com/src/js/DaveBlue/CODE10/180x150/2.gif">
</script>
</td>
</tr>
</table>

the text-align:center; doesn't seem to work.


Thanks for any help :)

KDLA
09-11-2006, 02:32 PM
Are you putting the style in the cell tag?
<td style="text-align: center;">

KDLA

sae
09-11-2006, 02:36 PM
put it inside a div

<div style="text-align: center;">YOUR LINK<div>

jeddik
09-11-2006, 02:54 PM
Well I tried both:



<div style="text-align: center;">
<table width="190px" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td style="text-align: center;">
<script type="text/javascript" src="http://www.bluehost.com/src/js/DaveBlue/CODE10/180x150/2.gif">
</script>
</td>
</tr>
<tr><td class ="smallType" >
<br/><br/>
<a href="http://www.bluehost.com/src/js/DaveBlue/CODE10/180x150/2.gif" onMouseover="window.status='www.bluehost.com'" ><b>Bluehost</b></a>
<br/><br/>
<a href="<?php echo $yol."ad_contact.php"; ?>" >
To advertise here <br/>
as a sponser Contact us</a>
</td>
</tr>
</table>
</div>


In IE its fine but in Moz FF the image is still on the left.

You can see the problem with the bluehost image on the index page
at my site:

www.yodbod.com

Any more ideas ?

Thanks

sae
09-11-2006, 03:33 PM
Could it be because a width isn't given by the script?

Rossario123
09-11-2006, 04:23 PM
<div style="margin:0 auto;">
<table width="190px" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td style="text-align: center;">
<script type="text/javascript" src="http://www.bluehost.com/src/js/DaveBlue/CODE10/180x150/2.gif">
</script>
</td>
</tr>
<tr>
<td class ="smallType" >
<br/><br/>
<a href="http://www.bluehost.com/src/js/DaveBlue/CODE10/180x150/2.gif" onMouseover="window.status='www.bluehost.com'" ><b>Bluehost</b></a>
<br/><br/>
<a href="<?php echo $yol."ad_contact.php"; ?>" >
To advertise here <br/>
as a sponser Contact us</a>
</td>
</tr>
</table>
</div>

mark_yieh
09-11-2006, 04:53 PM
I might be missing something here but it might be because you're calling a script tag and passing it an href that points to a .gif?

I'm assuming you want to load an image and align it right?

try using <img src="nameOfGif" width="x" height="x" />

DaveinLondon
09-12-2006, 11:27 AM
OK I sorted it - I increased one of the widths 190px
up to 212px and then it centered with text-align:center;

Actually it was centering but the width made it look like it wasn't !

Thanks anyway - some good points came out :)

skilled1
09-14-2006, 01:20 PM
that is why you should not use a browser to resize images, you should edit them to the size you want using a photo editing program such as photoshop