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

    formattazione problema con dichiarazione

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    questa è la fraase incriminata

    se metto degli script sotto di essa non funzionano

    se li metto sopra mi si sputtana tutta la formattazione

    secondo voi e qui chiedo dolo un parere


    siccome non uso xml, non ne sono capace, mi conviene togliere questa dichiarazione?

  2. #2

    re

    http://forum.html.it/forum/showthrea...readid=1132324

    che script nn ti funzionerebbe ?
    __________________________________________________ ____________
    poi mi dicono nn sono sintetico :master:

  3. #3
    se lo metto sotto non funziona proprio, se lo metto sopra invece è come se annullasse i margini dei div

    non so piu cosa pensare





    <style type="text/css">
    .menutitle{width:480;height:21;}
    .menucorpo{width:480;height:258;}
    .submenu{margin-bottom:0;}
    </style>
    <script type="text/javascript">
    var persistmenu="yes" //"yes" or "no". Make sure each div content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
    var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

    if (document.getElementById){
    document.write('<style type="text/css">\n')
    document.write('.submenu{display: none;}\n')
    document.write('</style>\n')
    }

    function SwitchMenu(obj){
    if(document.getElementById){
    var el = document.getElementById(obj);
    var ar = document.getElementById("masterdiv").getElementsBy TagName("div");
    if(el.style.display != "block"){ //DynamicDrive.com change
    for (var i=0; i<ar.length; i++){
    if (ar[i].className=="submenu") //DynamicDrive.com change
    ar[i].style.display = "none";
    }
    el.style.display = "block";
    }else{
    el.style.display = "none";
    }
    }
    }

    </script>

  4. #4

    Re: formattazione problema con dichiarazione

    Originariamente inviato da ashantis
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    a me sembra sbagliata ma non vorrei dire una baggianata
    xhtml strict io lo definisco così
    Codice PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

  5. #5

    Re: Re: formattazione problema con dichiarazione

    Originariamente inviato da mucu
    xhtml strict io lo definisco così
    giusto.

    ecco cosa non va:

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict  //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional  .dtd">

  6. #6
    stessi identici problemi

    vi posto l'head della mia pagina cosi mi si sputtana la pagina



    <?
    include ('config/config.php');
    include ('config/auth.lib.php');
    include ('config/reg.lib.php');
    include ('config/utils.lib.php');
    include ('js/linklampegg.php');
    include ('js/scriptparag.php');
    //azione discriminante della parte centrale del programma
    if (!(isset($_REQUEST['action']))) {
    $sAction = 'main';
    }else{
    $sAction = $_REQUEST['action'];
    }
    $citta = $_REQUEST['citta'];
    list($status, $user) = auth_get_status();
    $username=$user['username'];
    if ($username!="") {$id=trova_id($username);$tr=ridai_template($id);
    } else {
    $tr="va";}
    global $_CONFIG;
    ?>




    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional .dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>TITOLO</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
    .menutitle{background: white url(sbarra.jpg);width:480;height:21;}
    .menucorpo{background: white url(corpo.jpg);width:480;height:258;}
    .submenu{margin-bottom:0;}
    html
    {
    margin:0px;
    padding:0px;
    }

    body
    {
    margin:0px;
    padding:0px;
    font-family:Microsoft Sans Serif;
    font-size:12px;
    background:#000;
    color: #FFFFFF;
    }

    a
    {
    color:#FFFFFF;
    text-decoration:none;
    }

    a:hover
    {
    color:#FFFF66;
    }

    #main_div
    </head>
    <?
    if ($status == AUTH_LOGGED) {
    echo"{
    background: #000000 url(img/$tr/bgr.jpg) no-repeat left top;
    border-collapse:collapse;
    width:984px;
    height:768px;
    margin:0px auto 0px auto;
    }";}

    if ($status == AUTH_NOT_LOGGED) {
    echo"{
    background: #000000 url(img/$tr/bg.jpg) no-repeat left top;
    border-collapse:collapse;
    width:984px;
    height:768px;
    margin:0px auto 0px auto;
    }";}
    ?>

    #header
    {
    width:100%;
    height:185px;
    }
    #header
    {
    width:100%;
    height:185px;
    }



    #management_menu
    {
    width:172px;
    height:149px;
    float:none;
    padding-top:28px;
    line-height:20px;
    color: #FFFFFF;
    }

    #military_menu
    {
    margin:0px 0px 0px 0px;
    width:172px;
    height:126px;
    float:none;
    padding-top:28px;
    line-height:20px;
    color:#FFFFFF;
    }




    #footer
    {
    width:100%;
    clear:both;
    height:52px;
    background:url(img/vuoto.gif) center no-repeat;
    font-size:11px;
    color:#FFFFFF;
    padding-top:20px;
    }

    #left_col
    {
    width:188px;
    height:450px;
    float:left;
    padding-top:55px;
    padding-left:40px;
    }

    #right_col
    {
    width:180px;
    height:450px;
    float:left;
    padding-top:55px;
    padding-left:15px;
    }

    #cont_col
    {
    height:520px;
    float:left;
    width:528px;
    background:url(img/vuoto.gif) center no-repeat;
    }

    #mainframe
    {
    height:456px;
    width:500px;
    margin:5px 15px 30px 14px;
    overflow:auto;
    color: #FFFFFF;
    font-family:"Times New Roman", Times, serif;
    }

    #community_menu
    {
    width:172px;
    height:129px;
    float:none;
    padding-top:27px;
    padding-left:0px;
    line-height:20px;
    }

    #gioco_menu
    {
    margin:21px 0px 0px 0px;
    width:172px;
    height:129px;
    float:none;
    padding-top:27px;
    padding-left:0px;
    line-height:20px;
    }

    #statistiche_menu
    {
    margin:17px 0px 0px 0px;
    width:172px;
    height:73px;
    float:none;
    padding-top:25px;
    padding-left:0px;
    line-height:20px;
    }

    #login_menu
    {
    width:165px;
    height:149px;
    float:none;
    padding-top:27px;
    padding-left:7px;
    line-height:19px;
    color: #FFFFFF;
    }

    #reg_btn

    {
    margin:0 0 0 0;
    height:45px;
    width:165px;
    }

    #hint_menu
    {
    margin:0px 0px 0px 0px;
    width:160px;
    height:128px;
    float:none;
    padding: 27px 7px 0px 7px;
    line-height:20px;
    color:#FFFFFF;
    }

    #banner_menu
    {

    margin:19px 0px 0px 0px;
    width:172px;
    height:92px;
    padding-top:1px;
    float:none;
    line-height:20px;
    }

    .menu
    {
    font-size:12px;
    }

    .utente
    {
    background:#FFF9C8;
    font-size:10px;
    border:0px;
    width: 116px;
    margin-left:5px;
    }

    .pass
    {
    background:#FFF9C8;
    font-size:10px;
    border:0px;
    width: 98px;
    margin-left:5px;
    }

    .feudo
    {
    background:#FFF9C8;
    font-size:10px;
    border:0px;
    width: 150px;
    }
    .logbtn
    {
    background: url(img/vuoto.gif);
    width:100px;
    height:14px;
    border:0px;
    font-family:"Microsoft Sans Serif";
    font-size:12px;
    color:#FFFFFF;
    }
    #annunci
    {
    margin-top:11px;
    text-align:center;
    color: #000000
    }

    </style>

    </head>

  7. #7
    Comunque, nell'output non ci dovrebbe essere nessun carattere, nemmeno degli spazi, prima della <doctype>....

    Poi il contenuto del tag style nello head andrebbe messo dentro i commenti di html...

    Poi chiudi head prima di aver finito con i fogli di stile:

    #main_div
    </head>

    Insomma, ci sono un po' troppi errori per sperare che tutto funzioni bene!
    "Le uniche cose che sbagli sono quelle che non provi a fare."
    Atipica

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.