PDA

View Full Version : How To: Center The Output?


Charles.pilot
08-11-2008, 02:46 PM
Hi

Just wondering what i would add to this code to make the script "centerise" in the middle of my page?

-----------------------------------
<%
If Request.form("Text1") <> "" Then
Response.Buffer = True
Dim objXMLHTTP, xml

' Create an xmlhttp object:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

' Opens the connection to the remote server.
xml.Open "GET", "http://hiscore.runescape.com/index_lite.ws?player=" & request.Form("Text1") , False

' Actually Sends the request and returns the data:
xml.Send

tst = Replace(xml.responsetext, chr(10), "</td></tr><tr><td width=""100px"">")
tst = replace(tst, ",", "</td><td width=""100px"">")
Response.Write "<table><tr><td width=""100px"">" & tst & "</td></tr></table>"


Set xml = Nothing
End if
%>
--------------------------

charles

Spudhead
08-11-2008, 02:53 PM
See my reply on your other thread. This is really a CSS question and you should probably do it using a div with auto margins. But you can cheat and just stick it in a <div align="center"> like I did :D