seite klebt links

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • seite klebt links

    Hallo, eins vorneweg bin anfänger und hab ein problem mit der darstellung.
    sie seite ist links am rand und ich würde sie gerne zentrieren.
    hier mal die style.css, wenn noch was gebraucht wird einfach sagen ich versuche es dann zu posten. im vorraus schon mal vielen dank.

    PHP-Code:
    a
    {
    color:red;
    text-decoration:none;
    }
    a:hover
    {
    text-decoration:underline;
    }

    .
    a2
    {
    color:#red;
    text-decoration:none;
    }
    .
    a2:hover
    {
    text-decoration:underline;
    }



    .
    menue1
    {
    width:166px;
    height:20px;

    padding:2px;
    padding-left:10px;

    background-color:#f3941a;
    font-familyverdana;
    font-size13px;
    color:#000000;

    border-bottom-style:solid;
    border-bottom-width:1px;
    border-bottom-color:#ffffff;

    text-decoration:none;
    }

    .
    menue1:hover
    {
    background-color:#ffffff;
    text-decoration:none;
    }



    .
    menue2
    {

    height:20px;

    padding:2px;
    padding-left:10px;
    padding-right:10px;

    background-color:#f9b000;
    font-familyverdana;
    font-size13px;
    color:#000000;

    border-style:solid;
    border-width:1px;
    border-color:#5f1400;

    text-decoration:none;
    }

    .
    menue2:hover
    {
    background-color:#ffffff;
    text-decoration:none;
    }






    body,td,th {
        
    font-familyArialHelveticasans-serif;
        
    font-size14px;
        
    color#000000;
        
    }
    body {
        
    background-color#ffffff;
        
    margin-left0px;
        
    margin-top0px;
        
    margin-right0px;
        
    margin-bottom0px;
        
    }




    h1,h2,h3,h4,h5,h6 {
        
    font-weightbold;
    }
    h1 {
        
    font-size14px;
    }
    .
    style3 {
        
    font-familyArialHelveticasans-serif;
        
    font-weightbold;
    }
    .
    style4 {
        
    font-size14px;
        
    color#FF0000;
    }
    .
    style7 {color#FF6600; font-size: 48px;}





    Body,table,tr,td {
        
    scrollbar-base-color:#cccccc;
        
    scrollbar-track-color:#ccccc;
        
    scrollbar-highlight-color:#eee;
        
    scrollbar-3d-light-color:#FF0000;
        
    }









    .
    inputfeld {
        
    border-color:#c0c0c0;
    border-width:1px;
    border-style:solid;


    }

    .
    formfield {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 15px; BORDER-LEFT: #ffffff 1px solid; WIDTH: 90px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #990000
    }




    .
    select {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 130px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }



    .
    selectlang {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 300px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }



    .
    selectbreit {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 250px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }


    .
    textarea {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 450px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }


    .
    textareagastbuch {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 340px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }


    .
    textareakontakt {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 450px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }


    .
    textareauserspeichern {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9.5pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 220px; COLOR: #CCCCCC; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma, Arial, Geneva, Helvetica; TEXT-ALIGN: left; BACKGROUND-COLOR: #990000
    }


    .
    submit {
        
    BORDER-RIGHT1px solidBORDER-TOP1px solidFONT-WEIGHTboldFONT-SIZE9.5ptBORDER-LEFT1px solidWIDTH180pxCOLOR#ffffff; BORDER-BOTTOM: 1px solid; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ff9933; font-color: #FF9902
    }


    .
    menu {
        
    BORDER-RIGHT1px solidBORDER-TOP1px solidFONT-WEIGHTboldFONT-SIZE9.5ptBORDER-LEFT1px solidWIDTH150pxCOLOR#ffffff; BORDER-BOTTOM: 1px solid; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ff9933; font-color: #FF9902
    }


    .
    submitlong {
        
    BORDER-RIGHT1px solidBORDER-TOP1px solidFONT-WEIGHTboldFONT-SIZE9.5ptBORDER-LEFT1px solidWIDTH300pxCOLOR#ffffff; BORDER-BOTTOM: 1px solid; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ff9933; font-color: #FF9902
    }

    .
    submitsmall {
        
    BORDER-RIGHT1px solidBORDER-TOP1px solidFONT-WEIGHTboldFONT-SIZE9.5ptBORDER-LEFT1px solidWIDTH120pxCOLOR#ffffff; BORDER-BOTTOM: 1px solid; FONT-FAMILY: verdana, arial; BACKGROUND-COLOR: #ff9933; font-color: #FF9902
    }



    .
    schnickschnack {
        
    BORDER-RIGHT#990000 1px solid; BORDER-TOP: #990000 1px solid; BORDER-LEFT: #990000 1px solid; BORDER-BOTTOM: #990000 1px solid; BACKGROUND-COLOR: #990000
    }


    .
    kasten {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 15px; BORDER-LEFT: #ffffff 1px solid; WIDTH: 450px; COLOR: #333333; BORDER-BOTTOM: #ffffff 1px solid; TEXT-COLOR: Black; FONT-FAMILY: Arial, Helvetica, sans-serif; HEIGHT: 20px; BACKGROUND-COLOR: #990000
    }


    .
    tabelle {
        
    BORDER-RIGHT#ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 15px; BORDER-LEFT: #ffffff 1px solid; WIDTH: 450px; COLOR: #333333; BORDER-BOTTOM: #ffffff 1px solid; TEXT-COLOR: Black; FONT-FAMILY: Arial, Helvetica, sans-serif; HEIGHT: 20px; BACKGROUND-COLOR: #ecb080


  • #2
    Hallo,

    das CSS alleine lässt sich nicht analysieren, man braucht immer den HTML-Code dazu, daher nur eine generelle Antwort:

    Willst du etwas mit einer festen Breite horizontal zentrieren, dann reicht sowas:

    Code:
    width: [I][COLOR="Green"]breite[/COLOR][/I]px;
    margin: [COLOR="Green"][I]oben[/I][/COLOR]px auto [COLOR="Green"][I]unten[/I][/COLOR]px auto;
    Wenn es keine feste Breite ist oder du vertikale Zentrierung oder zentrierte Textausrichtung meinst, melde dich bitte noch einmal.

    Gruß,

    Amica
    [COLOR="DarkSlateGray"]Hast du die [COLOR="DarkSlateGray"]Grundlagen zur Fehlersuche[/color] gelesen? Hast du Code-Tags benutzt?
    Hast du als URL oder Domain-Beispiele example.com, example.net oder example.org benutzt?
    Super, danke!
    [/COLOR]

    Kommentar


    • #3
      konnte aus platzmangel nur den oberen teil nehmen. denke mal aber das müßte reichen.

      PHP-Code:
      <?

      function buildPages($total, $per_page, $shown_pages, $current_page, $LINK, $LINK_ADD = "") {
             if ($shown_pages < 3) {
                  $shown_pages = 3;
              } elseif ($shown_pages % 2 == 0) {
                  $shown_pages ++;
              }
              $LINK = str_replace("&p=".$current_page, "", $LINK);
              if ($current_page === "") {
                  $current_page = 1;
              }

              $page_num = (int)($total / $per_page);
              $page_num += ($total % $per_page) ? 1 : 0;
              $offset = $current_page - ($shown_pages - 1) / 2;
              if  ($offset > ($page_num - $shown_pages + 1)) {
                  $offset = $page_num - $shown_pages + 1;
              }
              if ($offset < 1) {  
                  $offset = 1;
              }
              $output = "\r\n(<b>$total</b> Einträge auf <b>$page_num</b> ".(($page_num > 1) ? "Seiten" : "Seite").")";
              $output .= ($offset > 1) ? "\r\n[<a ".$LINK_ADD." href=\"".$LINK."&p=1\" title=\"Erste\">&laquo;</a>]" : "";
              $offset_end = ($shown_pages < $page_num) ? $offset + $shown_pages : $page_num + 1;
              for ($i = $offset; $i < $offset_end; $i++ ) {
                   $output .= ($i != $current_page) ?
                                 "\r\n[<a ".$LINK_ADD." href=\"".$LINK."&p=$i\">$i</a>]" :
                                 "\r\n<b>($i)</b>";
              }
              $output .= ($offset < ($page_num - $shown_pages + 1)) ?
                          "\r\n[<a ".$LINK_ADD." href=\"".$LINK."&p=$page_num\" title=\"Letzte\">&raquo;</a>]" :
                          "";

              return "<div align=\"center\">$output</div><br /><br />\r\n";
          }


          
      function start_page($area) {

      global $dbname,$conn,$id_passwort,$id_name,$id_mail,$id_id;

      echo "<html><head>

      <link rel=\"stylesheet\" type=\"text/css\" href=\"./includes/style.css\">";

      include("includes/meta.htm");

      $query1='SELECT * FROM admin';
      $result1=mysql_db_query($dbname,$query1,$conn) or die ;
      $date=mysql_fetch_array($result1);

      $seitentitel= $date[seitentitel];

      echo "


      <script src=\"./zweitesfenster.js\" type=\"text/javascript\"></script>




      <script language=\"JavaScript\">

      <!--
      function MM_reloadPage(init) {  //reloads the window if Nav4 resized
        if (init==true) with (navigator) {if ((appName==\"Netscape\")&&(parseInt(appVersion)==4)) {
          document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
        else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
      }
      MM_reloadPage(true);
      // -->
      </script>


      <script type=\"text/javascrip\t\" language=\"javascript\">
      var intv = null;
      var wahl = null;
      var objekt = null;

      function surfto2 ()
      {
        for (var i = 0; i < objekt.length; i++)
        {
           if (objekt.options[i].value == wahl.value)
           {
              objekt.options[i].selected = true;
              break;
           }
        }
      }

      function Start (_wahl, _objekt)
      {
        wahl = _wahl;
        objekt = _objekt;
        intv = setInterval('surfto2()', 10);
      }
      </script>


      <script language=\"JavaScript\">
      <!--
      function surfto(form) {
      var myindex=form.select1.selectedIndex
      if (form.select1.options[myindex].value != \"0\") {
      parent.location=form.select1.options[myindex].value;}
      eingabe=document.form.eingabe.value;
      }
      //-->
      </SCRIPT>
      ";



      echo "

      <script>

      noOnClick = 0;

      submittedPic = 0;
      }
      function picSubmit(error) {
          if (error) {
              document.getElementById('i' + (submittedPic - 1)).className = 'picError';
              alert(error);
          }
          
          if ((submittedPic == 8) || (!document.getElementById('f' + submittedPic)) || (!document.getElementById('f' + submittedPic).value)) {
              document.location = 'main.php?open=bilderupload';
              return false;
          }
          
          for (i = 0; i < 8; i++) {
              elp = document.getElementById('p' + i);
              elf = document.getElementById('f' + i);
              eli = document.getElementById('i' + i);
              
              if (!elp) continue;
              
              if (i == submittedPic) {
                  elp.className = 'pRow';
                  elf.disabled = false;
                  eli.className = 'picCurrent';
              } else {
                  if (i < submittedPic && eli.className != 'picError') 
                      eli.className = 'picDone';
                  elp.className = 'pRowDisabled';
                  elf.disabled = true;
              }
          }
          //document.getElementById('i'+submittedPic).src = 'file://'+document.getElementById('f').value;
          disableSubmit('id_submit');
          submittedPic++;
          if (submittedPic)
              document.form.submit();
          return true;
      }

      function disableUnused() {
          var stop = false;
          for (i = 0; i < 8; i++) {
              elf = document.getElementById('f' + i);
              if (!elf) return false;
              elf.disabled = stop;
              stop = (!elf.value);
          }
      }

      function loadPics() {
          if (noOnClick)
              return;
          for (i = 0; i < 8; i++) {
              if (!document.getElementById('f' + i)) return false;
              if (document.getElementById('f' + i).value) {
                  document.getElementById('i' + i).src = 'file://' + document.getElementById('f' + i).value;
              }
          }
          disableUnused();
      }


      function loadPic(el) {
          if (el.value) {
              document.getElementById('i' + el.id.substr(1, 1)).src = 'file://' + el.value;
          }
          noOnClick = 1;
          disableUnused();
      }

      onload=disableUnused;
      onclick=loadPics;

      </script>


      </head>

      <body>


      <script language = \"javascript\">
      <!--

      function LmOver(elem, clr)
      {elem.style.backgroundColor = clr;
      elem.children.tags('A')[0].style.color = \"#000000\";
      elem.style.cursor = 'hand'}

      function LmOut(elem, clr)
      {elem.style.backgroundColor = clr;
      elem.children.tags('A')[0].style.color = \"#000000\";}

      function LmDown(elem, clr)
      {elem.style.backgroundColor = clr;
      elem.children.tags('A')[0].style.color = \"#000000\";}

      function LmUp(path)
      {location.href = path;}

      //-->      
      </script>






      </head>


      <body>




      <a href='index.php'><img src='images/logo.jpg' style='position:absolute; top:17px; left:20px'  alt='Flirt-und-chat' border='0' /></a>

      <a href='index.php' ><img src='images/menue_home.jpg' style='position:absolute; top:70px; left:0px' alt='Home' border='0' /></a>
      <a href='index.php?open=anmeldung'><img src='images/menue_anmeldung.jpg' style='position:absolute; top:70px; left:107px' alt='Anmeldung' border='0' /></a>
      <a href='index.php?open=neue'><img src='images/menue_neue_user.jpg' style='position:absolute; top:70px; left:208px'  alt='Neue User' border='0' /></a>
      <a href='index.php?open=suche'><img src='images/menue_user_suche.jpg' style='position:absolute; top:70px; left:309px' alt='User Suche' border='0' /></a>


      <img src='images/menue_leiste1.jpg' style='position:absolute; top:94px; left:0px; width:409px; height:32px' border='0' />
      <img src='images/menue_leiste2.jpg' style='position:absolute; top:70px; left:531px; width:472px; height:56px' border='0' />


              
      <img src='images/flirt_****************.jpg' style='position:absolute; top:130px; left:4px; border-style:solid; border-color:#dadada; border-width:1px; z-index:1' alt=' ' />

      <img src='images/statistik_bg.jpg' style='position:absolute; top:472px; left:5px; border-top-style:solid; border-color:#ffffff; border-top-width:2px; z-index:1' alt=' ' border='0' />
          


      <img src='images/herz.jpg' style='position:absolute; top:43px; left:409px; z-index:10' border='0' />


      <div style='position:absolute; top:99px; left:5px; z-index:2' >

      ";

      Kommentar


      • #4
        Für HTML- und CSS-Fragen bitte nie PHP-Code posten! Lade die Seite im Browser, lass dir den Quelltext anzeigen und poste den, bzw. ändere deinen Beitrag über den Button. Das Auslassen irrelevanter Teilbäume des HTML-Codes ist ausdrücklich empfohlen.

        Gruß,

        Amica
        [COLOR="DarkSlateGray"]Hast du die [COLOR="DarkSlateGray"]Grundlagen zur Fehlersuche[/color] gelesen? Hast du Code-Tags benutzt?
        Hast du als URL oder Domain-Beispiele example.com, example.net oder example.org benutzt?
        Super, danke!
        [/COLOR]

        Kommentar


        • #5
          @pumason
          Bitte deinen Quellcode umbrechen. Kein Mensch scrollt gerne kilometerweit nach rechts.

          Danke
          Peter
          Nukular, das Wort ist N-u-k-u-l-a-r (Homer Simpson)
          Meine Seite

          Kommentar


          • #6
            Sorry habe das nicht bedacht, das es noch kleine monitore gibt.... :-)
            habe den quellcode kopiert und nur das genommen.
            flirtforfun falls jemand den kompletten sehen will. danke im vorraus


            </div>

            </div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title>Unbenanntes Dokument</title>
            </head>
            <script type="text/javascript"><!--
            google_ad_client = "pub-7741559504674474";
            /* 300x250, Erstellt 23.09.09 */
            google_ad_slot = "9557427815";
            google_ad_width = 300;
            google_ad_height = 250;
            //-->
            </script>
            <script type="text/javascript"
            src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>
            <body>
            </body>
            </html>


            <br />





            <div style='background-color:#ee3100; padding:2px; font-size : 13px; font-family : verdana;'>
            <b>Unsere Statistiken</b>



            <div style='background-color:#ffffff; padding:5px; color:#000000; font-size : 13px; font-family : verdana'>


            <TABLE width='580px' align='center'>

            <TR width='200px'>
            <TD></TD>
            <TD></TD>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Er sucht sie</TD>
            <TD><A href="index.php?open=suche&rubrik=1">1</A></TD></TR>
            <TR width='200px'>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Deutschland</TD>

            <TD><A href="index.php?open=suche&land=1">4</A></TD>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Sie sucht ihn</TD>
            <TD><A href="index.php?open=suche&rubrik=2">0</A></TD></TR>
            <TR width='200px'>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>&Ouml;sterreich</TD>
            <TD><A href="index.php?open=suche&land=2">0</A></TD>

            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Er sucht ihn</TD>
            <TD><A href="index.php?open=suche&rubrik=3">0</A></TD></TR>
            <TR width='200px'>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Schweiz</TD>
            <TD><A href="index.php?open=suche&land=3">0</A></TD>
            <TD style='color:#000000; font-size : 13px; font-family : verdana'>Sie sucht sie</TD>

            <TD><A href="index.php?open=suche&rubrik=4">0</A></TD></TR></TABLE></P>




            </div>
            </div>

            Kommentar


            • #7
              Hallo,

              hab grad die Online-Version gesehen, nur <td> und <br>, wer hat dir das beigebracht?!? Bei dem HTML-Code wirst du mit CSS nicht weit kommen, da muss erstmal das HTML aufgeräumt und von den Tabellen befreit werden.

              Gruß,

              Amica
              [COLOR="DarkSlateGray"]Hast du die [COLOR="DarkSlateGray"]Grundlagen zur Fehlersuche[/color] gelesen? Hast du Code-Tags benutzt?
              Hast du als URL oder Domain-Beispiele example.com, example.net oder example.org benutzt?
              Super, danke!
              [/COLOR]

              Kommentar


              • #8
                das hat eine Firma erstellt. Habe das Script mal von denen gekauft.
                ich persönlich kenn mich mit html/php usw... nicht so damit aus. Habe aber in nachhinein festgestellt das diese Firma "naja ist". ok dann schmeiß ich den kram doch in die Tonne. Hätte ich gleich machen sollen, hätte ich mir viel zeit gespart. T
                Trotzdem danke für die Hilfe.

                Kommentar

                Lädt...
                X