# How do i center this button?



## neomatrix (Aug 6, 2006)

I have a java script print page button on my page and I cant center the button on the page, below is mu code and a link to the page.


<%@ Page Language="VB" MasterPageFile="~/Default.master" Title="Hattiesburg Computer | Coupon"
CodeFile="Links.aspx.vb" Inherits="Links_aspx" %>

<asp:content id="Content1" contentplaceholderid="Main" runat="server">

<div class="shim column">
<p></p>
<p></p>
<p></div>

<div class="page" id="links">
<div id="content">
</div>
<div id="Div1">
<h3 align="center">
<img border="0" src="hcsspacebanner.gif" width="468" height="60"></h3> 

<h3 align="center">Please print this coupon</h3> 

<div style="width: 422; height: 213; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<p align="center"><font size="5">Present this coupon to recieve</font></p>
<p align="center"><font size="5">a 7% discount off of any parts</font></p>
<p align="center"><font size="5">or labor from </font></p>
<p align="center"><font size="5">Hattiesburg Computer</font></p>
<p align="center"><font size="5">601-296-9692</font></p>
<p align="center">This coupon expires 12-31-2006</div>
</div>
<script language="Javascript1.2">
var message = "Print Coupon";

function printpage() {
window.print(); 
}

document.write("<form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form>");

//-->
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-1607226966369750";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

</asp:content>


www.hattiesburgcomputer.com/coupon.aspx


----------



## DJ-Zep (Mar 11, 2006)

You can do this:

```
<div style="width: 422; height: 213; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<p align="center"><font size="5">Present this coupon to recieve</font></p>
<p align="center"><font size="5">a 7% discount off of any parts</font></p>
<p align="center"><font size="5">or labor from </font></p>
<p align="center"><font size="5">Hattiesburg Computer</font></p>
<p align="center"><font size="5">601-296-9692</font></p>
<p align="center">This coupon expires 12-31-2006</div>
</div>
<script language="Javascript1.2">
var message = "Print Coupon";

function printpage() {
window.print();
}

document.write("<div align=\"center\"><form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form></div>");

//-->
</script>
```


----------



## neomatrix (Aug 6, 2006)

Thank you it worked perfectly. I dont know anything about java so I greatly appreciate your help.


----------

