Ok I got a Javascript object I pasted in to my site and im trying to center it

Ok I got a Javascript object I pasted in to my site and im trying to center it

the site is berkshiregardenservices dot com /test.htm

<div id=“cont_dae5bb532872e4d3c4b471caf8d52247”><a href=“http://www.yourweather.co.uk/weather_Newbury-Europe-United+Kingdom-Hampshire--1-34349.html” target=“_blank” title=“Weather in Newbury, Berkshire”>Weather in Newbury, Berkshire</a><script type=“text/javascript” src=“http://www.yourweather.co.uk/wid_loader/dae5bb532872e4d3c4b471caf8d52247”></script></div>

All help appreciated

Hi yourm9, welcome to SitePoint. :slight_smile:

Firstly, that “main” container should be a div rather than a span.

The way to center an element then is to make sure it has a set width and then apply margin: 0 auto; to it.

Thanks, it worked fine.