Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 21
  1. #1

    Un problema un po strano

    Buongiorno carissimi amici,
    premettendo che sono un autodidatta, vi chiedo:
    mi sono realizzato uno script che mi permetta di generare dei link che comporranno poi un menù.

    Lo script sembra essere OK, l'unico problema che anzichè "cliclare" in orizzontale, lo fa in verticale, ecco qui di seguito il codice:

    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="<%=urlfrasimagiche%>images/sf_menu.gif" class="TESTO10">


    <%
    Set rscatego = server.createobject("adodb.recordset")
    sql = "select categ from categorie order by id "
    rscatego.Open sql, Conn3
    if not rscatego.eof then
    do while not rscatego.eof

    categ = rscatego("categ")

    %>

    <tr>
    <td width="10"></td>
    <td width="6" rowspan="3" align="center">[img]<%=urlfrasimagiche%>images/divisore.gif[/img]</td>
    <td width="10" rowspan="3" align="center"></td>
    </tr>
    <tr>

    <td height="5" align="center" background="<%=urlfrasimagiche%>images/div_orizz.gif" style="background-repeat: repeat-x; background-position:center"></td>
    </tr>
    <tr>
    <td width="10"></td>
    <td align="center">" class="TESTO10"><%=rscatego("categ")%></td>
    </tr>



    <%
    rscatego.movenext
    loop
    end if
    rscatego.close
    set rscatego = Nothing
    %>


    </table>

    Cortesemente mi aiutereste a risolvere il problema? il risultato dovrebbe essere più o meno questo: www.frasimagiche.net

    Cordiali saluti
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

  2. #2
    caro autodidatta (non è ironico, qui penso quasi tutti siano autodidatti),

    ci sono due soluzioni al tuo problema.. la prima è che invece di mettere <tr></tr> all'interno del ciclo, li devi mettere fuori dal ciclo..in questo caso avrai tutte <td> sulla stessa riga e quindi i link in orizzontale.. la seconda, usare una lista <ul>[*]..[/list]e formattarla correttamente con i css. Detto ciò, la seconda soluzione è ottimale e moderna, la prima una cosa stile "web 0.5" e superata.


    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  3. #3
    Ciao Santino...e grazie x aver risposto :-)
    Riguardo il fatto di mettere <tr></tr> fuori dal ciclo, ho già provato e non va lo stesso, per quanto riguarda invece la seconda opzione che mi dai...diciamo che non è x me...eh eh...diciamo che x essere un autodidatta riesco a fare abbastanza, ma non tutto ovviamente.

    Fabry
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

  4. #4
    posta il codice con le <tr> fuori dal ciclo, che gli si dà un'occhiata

  5. #5

    in verticale anzichè orizzontali

    Boh, il massimo che riesco a fare è così www.frasimagiche.net/admin.asp , ma come mai?

    Chi mi da una mano?

    Grazie :-)
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

  6. #6
    Quello che vedi in questa pagina www.frasimagiche.net/admin.asp l'ho fatto con questo codice:

    codice:
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="<%=urlfrasimagiche%>images/sf_menu.gif" class="TESTO10">
              <tr>
                <td width="10" height="40"></td>
                <td rowspan="3" align="center">
    
    
    <%
    Set rscatego = server.createobject("adodb.recordset")
    sql = "select categ from categorie order by id "
    rscatego.Open sql, Conn3
    if not rscatego.eof then
    do while not rscatego.eof
    						 
    categ = rscatego("categ")
    
    %>
    
    
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="<%=urlfrasimagiche%>images/sf_menu.gif" class="TESTO10">
              <tr>
                <td width="6" rowspan="3" align="center">[img]<%=urlfrasimagiche%>images/divisore.gif[/img]</td>
                <td width="150" height="40" align="center">[img]<%=urlfrasimagiche%>images/iconapng.png[/img]</td>
                <td width="6" rowspan="3" align="center">[img]<%=urlfrasimagiche%>images/divisore.gif[/img]</td>
              </tr>
              <tr>
                <td height="5" align="center" background="<%=urlfrasimagiche%>images/div_orizz.gif" style="background-repeat: repeat-x; background-position:center"></td>
              </tr>
              <tr>
                <td align="center">" class="TESTO10"><%=rscatego("categ")%></td>
    		  </tr>
            </table>
    
    
    
    <%
    rscatego.movenext
    loop
    end if
    rscatego.close
    set rscatego = Nothing
    %>
    
    			</td>
                <td width="10" rowspan="3" align="center"></td>
              </tr>
              <tr>
                <td width="10" height="5" style="background-repeat: repeat-x; background-position:center"></td>
              </tr>
              <tr>
                <td width="10"></td>
              </tr>
            </table>
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

  7. #7
    la <td> và dentro il ciclo..quindi

    while ...

    <td>
    <table>....
    </table>
    </td>

    wend
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  8. #8

    Ecco il risultato

    Ora fa proprio pietà www.frasimagiche.net/admin.asp ...eh eh...che figura!!! :-(
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

  9. #9
    se questo è il codice:

    codice:
     <tr>
            <td>
    		
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://www.frasimagiche.net/images/sf_menu.gif" class="TESTO10">
              <tr>
                <td width="10" height="40"></td>
                <td rowspan="3" align="center">
    
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://www.frasimagiche.net/images/sf_menu.gif" class="TESTO10">
              <tr>
    		<td width="6" rowspan="3" align="center">
    
    
    
    
    </td>
                <td width="150" height="40" align="center"></td>
                <td width="6" rowspan="3" align="center"></td>
              </tr>
              <tr>
                <td height="5" align="center" background="http://www.frasimagiche.net/images/div_orizz.gif" style="background-repeat: repeat-x; background-position:center"></td>
              </tr>
              <tr>
                <td align="center">Frasi
    
    
    
    
    
    
    
    
    </td>
                <td width="150" height="40" align="center"></td>
                <td width="6" rowspan="3" align="center"></td>
              </tr>
              <tr>
                <td height="5" align="center" background="http://www.frasimagiche.net/images/div_orizz.gif" style="background-repeat: repeat-x; background-position:center"></td>
              </tr>
              <tr>
                <td align="center">Ricette
    
    
    
    
    
    
    
    
    </td>
                <td width="150" height="40" align="center"></td>
                <td width="6" rowspan="3" align="center"></td>
              </tr>
              <tr>
                <td height="5" align="center" background="http://www.frasimagiche.net/images/div_orizz.gif" style="background-repeat: repeat-x; background-position:center"></td>
              </tr>
              <tr>
                <td align="center">Barzellette
    che genera, direi che ad occhio ti sia scordato di mettere l'apertura e chiusura delle table per ogni td stampata.. cmq, autodidatta..fidati.. css.. una cosa di quelle che stai a fare te in css si fa:

    codice:
    <ul id="menu">[*]pls1
    <li class="divisore">[*]pls2[/list]
    
    css:
    
    #menu{ margin:0; padding:0; list-style-type:none}
    #menu li{ float:left; width:xxpx;...}
    #menu .divisore{ background:#000000; }
    per esempio.. inzia a dare un'occhiata ai css
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  10. #10
    Caro Santino...a 55 anni suonati non mi posso mettere a imparare i CSS, ho tante altre cose da fare che imparare i CSS, quello che so per me è abbastanza, e poi non saprei da dove iniziare.
    Ti ringrazio comunque, sei stato gentilissimo.

    Saluti
    Per le tue vacanze a otranto scegli www.vacanzeotranto.net.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.