atari400 atari400 - 1 year ago 56
HTML Question

unable to allign script at center of page despite several attempts

I am unable to place my ads at the center of my site

this is the script:

<script type="text/javascript">
ch_client = "verronica";
ch_width = 250;
ch_height = 250;
ch_type = "mpu";
ch_sid = "Chitika Default";
ch_color_site_link = "0000CC";
ch_color_title = "0000CC";
ch_color_border = "FFFFFF";
ch_color_text = "000000";
ch_color_bg = "FFFFFF";
<script src="" type="text/javascript">

I have tried various attempts like:

<div align="center">


<td allign="center">

but all did not go so well Its all just alligned to left.
I have run out of all clues as I am very poor in css

Answer Source

Its simple, just assign some hard code WIDTH and apply MARGIN to AUTO to your DIV (which is wrapping your ADs). For Example:

<div style="width:1024px; margin:auto;">
    <!-- Your Ad related code here -->

or simply if you want to get width dynamicaly as soon as your page loads, then do let me know in your comment, i will surely get that done for you :)

All the Best !

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download