Jump to content

I Want To Center My Javascript


Beedoo
 Share

Recommended Posts

Hello,Does someone know how i can center this javascript?do i have to add somthing with div ad the begin and at the end?<script language="javascript" type="text/javascript"> var aps_bgcolor ='FFFFFF'; var aps_ibgcolor ='FFFFFF'; var aps_bbgcolor ='DADADA'; var aps_fgcolor ='00526E'; var aps_ifgcolor ='00526E'; var aps_bfgcolor ='00526E'; var aps_username ='1237830356KXHC'; var aps_title ='RnJlZSBQZW9wbGUgU2VhcmNoZXM'; var aps_tid =''; var aps_formstyle=2;</script></div><script language="javascript" src="http://acme-people-search.com/js/signupbox.js" type="text/javascript"></script>

Link to comment
Share on other sites

Javascript is not something you center, Javascript does not display on the page. It's only code. If that signupbox.js file creates elements on the page, you can either look for a class name on the element which you can use to style it, or yeah you can wrap another element around the element that gets created and style it that way.

Link to comment
Share on other sites

Javascript is not something you center, Javascript does not display on the page. It's only code. If that signupbox.js file creates elements on the page, you can either look for a class name on the element which you can use to style it, or yeah you can wrap another element around the element that gets created and style it that way.
Can you please show me what i have to add? because i dont have any experience at html.and yes the signupbox.js is shown on my blog. can you please show me what i have to add to that part?
Link to comment
Share on other sites

why not center the HTML element that contains the blog (the container for the box). If not, make one. You can then center it using CSS, by applying something like margin: 0 auto to that block. Maybe best read the HTML/CSS tutorials around here?

Link to comment
Share on other sites

The script builds a table element. The ideal thing would be to center the table itself. So let's put the thing in a container, like this:

<div id="signupContainer">   <script language="javascript" src="http://acme-people-search.com/js/signupbox.js" type="text/javascript">   </script> </div>

And assign the table some CSS like this:

<style type="text/css">   #signupContainer table {	  margin: 0 auto;   }</style>

Remember that style tags go in your <head> element. If you already have a style sheet, you do not need additional <style> tags. Just put the definition in the existing stylesheet.

Edited by Deirdre's Dad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...