Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    guestbook in ASP che non si centra

    Salve,
    ho trovato un guestbook molto carino in ASP, unico neo è che è tutto spostato a sinistra e non riesco a centrarlo. Non sono un "mostro" in ASP e Html , ma di solito queste cosette le risolvo in 2 secondi.
    Va a capire !!!

    Vi posto il codice della pagina index.asp che ritengo la responsabile.

    codice:
    <%@LANGUAGE="VBSCRIPT"%>
    
    <%
    Dim msg_id
    Dim msg_name
    Dim msg_oggetto
    Dim msg_email
    Dim msg_city
    Dim msg_country
    Dim msg_homepage
    Dim msg_icq
    Dim message
    Dim msg_date
    Dim strMode
    Dim rsguest
    Dim vpage 
    Dim page 
    Dim Block 
    Dim Blocks 
    Dim i 
    Dim totale
    Dim maxpages 
    Dim PagStart
    Dim PagStop
    Dim RemainingRecords
    Dim msg
    Block = Request.querystring("Block")
    page = Request.querystring("page")
    
    If Block="" Then Block=1 
    If page="" Then page=1
    
    strMode = "new"
    %>
    <html>
    <head>
    <title><% = Uguestname %></title>
    
    <LINK href="include/styles.css" rel=stylesheet>
    </head>
    
    <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="600" align="center" valign="top">
    	
    	</td>
    
      </tr>
    </table>
    
    <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="600" align="center" valign="top">
    <%
    Set rsguest = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT message.* FROM message ORDER BY msg_id DESC;"
    msg = "<div align center>
    
    " & strLangErrorMessageNomessage1 & "</div>"
    
    rsguest.Open strSQL, adoCon, 1, 3 
    rsguest.PageSize = intRecordsPerPage
    	
    If NOT rsguest.EOF Then rsguest.AbsolutePage = page
    
    If rsguest.EOF Then
    	Response.Write msg
    Else	
    	
    	totale = rsguest.RecordCount	
    	
    	For u=1 to intRecordsPerPage
    	
    	  If rsguest.EOF Then Exit For
                msg_name = rsguest("Name")
                msg_email= rsguest("Email")
    			msg_city = rsguest("City")
    			msg_country = rsguest("Country")
                msg_homepage= rsguest("Homepage")
    			msg_icq =rsguest("Icq")
                message= rsguest("Message")
                msg_date =rsguest("Date")
    			msg_oggetto =rsguest("Oggetto")
    			
    %>
    <table width="82%" border="0" align="center" cellpadding="2" cellspacing="2" class="tablemenu">
          <tr bgcolor="#FFFF66"> 
            <td colspan="2" align="right"> <div align="left">[img]images/author.gif[/img] 
                 
                <% = msg_name %>
                </div>
              </td>
          </tr>
          <tr> 
            <td height="23" colspan="2"></td>
          </tr>
          <tr> 
            <td colspan="2" align="justify"><% = message %></td>
          </tr>
          <tr> 
            <td colspan="2"></td>
          </tr>
          <tr> 
            <td colspan="2"><div class="hrblue">[img]images/spacer.gif[/img]</div></td>
          </tr>
          <tr> 
            <td width="49%" align="right" valign="top"> <% = msg_oggetto %>  
              <% If msg_city <>"" Or msg_country <> "" Then response.write "|[img]images/author_from.gif[/img]"%>
               <% If msg_city <>"" then response.write msg_city & ""
    	     If msg_country <>"" then response.write "" & msg_country & ""%> <% If msg_homepage <>"" Then response.write "|[img]images/author_homepage.gif[/img]"%> <% If msg_icq <>"" Then response.write "|[img][/img]"%>  </td>
            <td width="51%" align="right" valign="top"><%=formatDateTIME( msg_date, vbLongDate )%> 
              <% = strLangGlobAt %>
              <%=formatDateTIME( msg_date, vbShortTime )%> </td>
          </tr>
        </table>
    				
    
                    <%
       rsguest.movenext
    	Next
    %>
    
    
    
    
    <%
    'paginazione
    Response.Write "<table width=""90%""  align=""center"" border=""0"" cellspacing=""0"" cellpadding=""0"" height=""20""><tr><td align=""center"" width=""30%"">"
    maxpages = int(totale / intRecordsPerPage)
    If (totale mod intRecordsPerPage) <> 0 Then 
       maxpages = maxpages + 1 
    End If 
    
    Blocks=0
    Blocks = int(maxpages / PagesPerBlock)
    If (maxpages mod PagesPerBlock) <> 0 Then 
    	Blocks = Blocks + 1 
    End If 
    
    Response.Write "" & strLangGlobPage & " " &  page &  " " & strLangGlobOf & " " & maxpages & "</td>"
    Response.Write "<td align=""center"" width=""70%"">"
    
    PagStop=Block*PagesPerBlock
    PagStart=(PagStop-PagesPerBlock)+1
    
    i=0
    If maxpages>1 Then 
    	For vpage=PagStart to PagStop
            i=i+1 
            If Block=1 Then i=0    
            
            If i=1 And Block>1 Then 
               Response.Write "<A href='" & request.servervariables("SCRIPT_NAME") & "?Block=" & _
               (Block-1)& "&page=" & vpage-1 & "' title='" & strLangNavAltPagePrev & "'>" & _
               "[img]images/frecciasx.gif[/img][img]images/frecciasx.gif[/img]</A>"
            End If
            
            RemainingRecords = totale-(vpage*intRecordsPerPage)  
            If RemainingRecords > 0 Then 
    		   If vpage=CInt(page) Then
               Response.Write"" & vpage & " "
    		   Else
               Response.Write "<A href='" & request.servervariables("SCRIPT_NAME") & "?Block=" & Block & _
               "&page=" & vpage & "'>" & vpage & "</A> "
    		   End If
            Else 
    		   If vpage=CInt(page) Then
               Response.Write"" & vpage & " "
    		   Else
               Response.Write "<A href='" & request.servervariables("SCRIPT_NAME") & "?Block=" & Block & _
               "&page=" & vpage & "'>" & vpage & "</A> "
    		   End If
               Exit For
            End If
            
            If vpage=PagStop And Blocks>1 and int(Block-1)<int(Blocks) Then 
               Response.Write "<A href='" & request.servervariables("SCRIPT_NAME") & "?Block=" & (Block+1) & _
    		   "&page=" & vpage+1 &  "' title='" & strLangNavAltPageNext & "'>" & _ 
    		   "[img]images/freccia.gif[/img][img]images/freccia.gif[/img]</A>"
            End If
    	Next
    End If
    
    Response.Write "</td></tr></table>"
    %>
    <% End If %>
    
    
    
    <% 
    rsguest.Close
    Set rsguest = Nothing
    Set strCon = Nothing
    Set adoCon = Nothing
    %>

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Che vuol dire non si centra...

    Roby

  3. #3
    che il form per spedire i messaggi ed i messaggi sono tutti a sinistra, se vuoi quardarlo è in test quì

  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    A sinistra rispetto a cosa?
    Cmq è un problema HTML, non ASP.

    Roby

  5. #5
    Originariamente inviato da Roby_72
    A sinistra rispetto a cosa?
    Non lo vedi spostato a sinistra e non centrato nel monitor ?

  6. #6
    Utente bannato
    Registrato dal
    Mar 2005
    Messaggi
    136
    prova a mettere nel tag body style="text-align:center"

  7. #7
    Utente bannato
    Registrato dal
    Mar 2005
    Messaggi
    136
    o meglio visto che lo hai nel foglio di style

  8. #8
    Originariamente inviato da avatar
    o meglio visto che lo hai nel foglio di style
    non conosco bene i fogli di style, dove lo modifico?

    codice:
    /* definiamo il colore dello sfondo e della barra di scorrimento (IE6) */
    /* background colour and property of sliding bar (IE6) */
    BODY {
    	background: #D0F4FF url(../images/base.gif) repeat; SCROLLBAR-FACE-COLOR: #66ccff; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #ffffff; SCROLLBAR-3DLIGHT-COLOR: #66ccff; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #ffff99; SCROLLBAR-DARKSHADOW-COLOR: #66ccff; SCROLLBAR-BASE-COLOR: #ffff99
    }
    
    /* definiamo la tipolgia di font e la dimensione per i tag fondamentali */
    /* kind of font and size relating to the basic tags */
    TD {
    	FONT:  11px Tahoma, Verdana, Arial, sans-serif
    }
    P {
    	FONT:  11px Tahoma, Verdana, Arial, sans-serif
    }
    DIV {
    	FONT:  11px Tahoma, Verdana, Arial, sans-serif
    }
    
    /* caratteristiche dei link */
    /* property of hyperlinks*/
    A {
    	COLOR: #ff0000; CURSOR: hand; FONT: 11px Tahoma, Verdana, Arial, sans-serif; TEXT-DECORATION: underline
    }
    A:hover {
    	COLOR: #ff0000; TEXT-DECORATION: none; background-color : #D0F4FF
    }
    A:active {
    	COLOR: #ff0000
    }
    
    /* queste classi definiscono gli style per i tag relativi ai moduli ( input, select )*/
    /* these classes are related to the form tags ( input, select )*/
    .form  {
    	font-size : 11px;
    	font-family : Tahoma, Verdana, Arial, sans-serif;
    	color : #000000;
    	border-width : 1;
    	border-style : solid;
    	border-color : #005980;
    	background-color : #ffffff;
    }
    .pulsante  {
    	font-size : 11px;
    	font-family : Tahoma, Verdana, Arial, sans-serif;
    	color : #ff0000;
    	border-width : 1;
    	border-style : solid;
    	border-color : #005980;
    	background-color : #D0F4FF;
    }
    
    
    /* tale classe definisce gli style per il bordo ed il colore di sfondo delle tabelle */
    /*  this class is related to the edges and to the background colour of the tables */
    .tablemenu  {
    	border-width : 1;
    	border-style : dashed;
    	border-color : #005980;
    	background-color : #ffffff;
    }
    
    /* tale classe definisce uno dei due colori base ovvero il rosso */
    /* basic colour: red */
    .red {
    	COLOR: #ff0000
    }
    
    /* tale classe definisce l'altro colore base ovvero il blue */
    /* basic colour: blue */
    .blue{
    	COLOR: #005980
    }
    
    /* queste classi simulano il tag hr per evitare incompatibilità con browser diversi da IE */
    /* these classes simulate the tag hr in order to avoid problems with browser various from IE */
    /* Thanks ..:: gico ::.. */
    .hrred { margin-top: 7px; margin-bottom: 7px; background-color: #ff0000}
    .hrblue { margin-top: 7px; margin-bottom: 7px; background-color: #005980}

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.