1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. Informatik Forum
  2. Webmaster & Internet
  3. Entwicklung

Falsche Darstellung im FF | Wieso?

  • wanted
  • 14. Oktober 2009 um 17:20
  • Unerledigt
  • wanted
    5
    wanted
    Mitglied
    Punkte
    195
    Beiträge
    30
    • 14. Oktober 2009 um 17:20
    • #1

    Hallo Leute,

    Ich habe erneut ein Problem und ich hoffe ihr könnt mir diesmal wieder behilflich sein...

    Ich hatte auf meiner Seite eine Loginbox an einer bestimmten Position. Dort hat sie mir jedoch nicht gefallen und ich wollte sie nun an eine andere Stelle platzieren. Gewollt - getan...wenn ich es im Internet Explorer mir ansehe passt auch alles. Im Firefox jedoch gar nicht.

    Hier einmal die Screenshots damit ihr seht was ich meine:

    Ansicht im Firefox:
    http://img124.imageshack.us/i/screenfalsch.jpg/

    Ansicht im Internet Explorer:
    http://img380.imageshack.us/img380/4849/screenrichtig.jpg

    Hier der Code welchen ich eingefügt habe:

    Zitat


    //Side LOGINBOX Copyright EliteLadders LTD
    if (isset($_COOKIE['user'])){
    $member=mysql_query("SELECT * FROM members WHERE id='{$_COOKIE['tid']}' AND password='{$_COOKIE['pass']}'");
    $member=mysql_fetch_array($member);
    $newpm=mysql_query("SELECT COUNT(*) FROM messages WHERE toid='{$_COOKIE['tid']}' AND active='1' AND grid='1'");
    $newpm=mysql_fetch_array($newpm);
    $newpm="$newpm[0]";
    $newin=mysql_query("SELECT COUNT(*) FROM messages WHERE toid='{$_COOKIE['tid']}' AND grid='2'");
    $newin=mysql_fetch_array($newin);
    $newin="$newin[0]";
    $newfriends=mysql_query("SELECT COUNT(*) FROM friend_requests WHERE userid='{$_COOKIE['tid']}'");
    $newfriends=mysql_fetch_array($newfriends);
    $newfriends="$newfriends[0]";
    if($newfriends == 0){$currentf="$newfriends Friend Invites";}else if($newfriends == 1){$currentf="<font color='red'><b>$newfriends Friend Invites</b></font>";}else{
    $currentf="<font color='red'><b>$newfriends Friend Invites</b></font>";}
    if($newpm == 0){$currentm="$newpm Unread Messages";}else if($newpm == 1){$currentm="<font color='red'><b>$newpm Unread Message</b></font>";}else{
    $currentm="<font color='red'><b>$newpm Unread Messages</b></font>";}
    if($newin == 0){$currentin="$newin Current Team Invites";}else if($newin == 1){$currentin="<font color='green'><b>$newin Current Team Invite</b></font>";}else{
    $currentin="<font color='green'><b>$newin Current Team Invites</b></font>";}
    echo"<div class='login-box'><br /><div align='center'><b>Welcome Back $member[name]!&nbsp;&nbsp;</b><br /><br />";
    echo"<a href='./mailbox.php'>$currentm</a> &nbsp;&nbsp;<br />";
    echo"<a href='./mailbox.php?action=invites'>$currentin</a> &nbsp;&nbsp;<br />";
    echo"<a href='./mailbox.php?action=friends'>$currentf</a> &nbsp;&nbsp;<br /><br />
    [<a href='./manager.php?action=manage'><span style='color:#FFFFFF;'>Team Manager</span></a>]<br />
    [<a href='./manager.php'><span style='color:#FFFFFF;'>Profile Manager</span></a>] [<a href='./profile.php?account=$member[id]'><span style='color:#FFFFFF;'>My Profile</span></a>]
    [<a href='./login.php?act=logout'><span style='color:#FFFFFF;'>Logout</span></a>]&nbsp;&nbsp;</div></div>";
    }else{echo"<div class='login-box'><div align='center'></form><form method='post' action='./login.php'>
    <label for='login-username'>Username:</label><input type='text' class='logbox' name='login[name]' id='login-username' value='Username' maxlength='15' onClick=\"this.value=''\"><br />
    <label for='login-password'>Password:</label><input type='password' class='logbox' name='login[pass]' id='login-password' value='Password' maxlength='20' onClick=\"this.value=''\"><br />
    <label for='login-remember'>Remember:</label><select name='login[clength]' id='login-remember' class='logbut'>
    <option value='60'>1 Hour</option>
    <option value='1440'>1 Day</option>
    <option value='10080'>1 Week</option>
    <option value='43200'>1 Month</option>
    <option value='83200' selected='selected'>Forever</option></select><br />
    <input type='hidden' name='act' value='setlogin'>
    <input type='submit' class='login-submit' name='submit' value='Login &gt;&gt;'><br /><a href='./register.php'>Register</a>&nbsp&nbsp<a href='./login.php'><font color='red'>Forgotten Password?</font></a></form></div></div>";}
    //End LOGINBOX

    Alles anzeigen

    Ich hoffe jemand von euch weiß wieso das so ist und ich hoffe ihr könnt mir helfen!

    Danke schonmal im vorraus!

    Lg und schönen Tag noch!

  • sutupud
    13
    sutupud
    Mitglied
    Reaktionen
    59
    Punkte
    1.659
    Beiträge
    320
    • 14. Oktober 2009 um 17:34
    • #2

    der code alleine sagt nicht viel aus, damit dir jemand helfen kann, solltest du auch die stylesheets posten.

    "All through my life I've had this strange unaccountable feeling that something was going on in the world, something big, even sinister, and no one would tell me what it was."
    "No," said the old man, "that's just perfectly normal paranoia. Everyone in the Universe has that."

    &#128513;&#128514;&#128515;&#128516;&#128517;&#128518;&#128519;&#128520;&#128521;&#128522;&#128523;&#128524;&#128525;&#128526;&#128527;&#128528;&#128530;&#128531;&#128532;&#128534;&#128536;&#128538;&#128540;&#128542;&#128544;&#128545;&#128546;&#128547;&#128549;&#128552;&#128553;&#128554;&#128555;&#128557;&#128560;&#128561;&#128562;&#128563;&#128565;&#128566;&#128567;

  • wanted
    5
    wanted
    Mitglied
    Punkte
    195
    Beiträge
    30
    • 15. Oktober 2009 um 06:47
    • #3

    Hallo,

    Hier ist die Stylesheet!
    Ich hoffe mir kann jemand behilflich sein!

    Zitat


    <style type="text/css">
    body{
    font-size:11px;
    color:#494949;
    font-family:Verdana, Geneva, sans-serif;
    background-color:#FFFFFF;
    margin:0;
    padding:0;
    background-image: url('./theme/default/images/new/bgtile.gif');
    background-repeat: repeat;
    }
    A:link {
    color:#494949;
    text-decoration: underline;
    }
    A:visited {
    color:#494949;
    text-decoration: underline;
    }
    A:hover {
    color:#a5a5a5;
    }
    #wrap {
    color:#494949;
    background-color:#F1F1F1;
    border-left: 1px solid #494949;
    border-right: 1px solid #494949;
    width:900px;
    margin:0 auto;
    overflow:hidden;
    padding:0;
    position:relative;
    }
    #header {
    width:900px;
    margin:0;
    height:179px;
    padding:0;
    }
    .time {
    text-align: left;
    margin:0;
    padding:5px 0 0 8px;
    }
    .links {
    padding:0;
    margin-bottom:1px;
    }
    .logo {
    background:url(./theme/default/images/new/logo.gif);
    width:446px;
    height:140px;
    margin:0;
    padding:0;
    float:left;
    }
    .login-box {
    background:url(./theme/default/images/new/login-box.gif) no-repeat;
    width:250px;
    margin:0 20px 0 0;
    padding:0;
    height:138px;
    float:right;
    }
    .login-box label{
    margin-right: 1em;
    }
    .login-box A:link {
    color:#FFFFFF;
    text-decoration: none;
    }
    .login-box A:visited {
    color:#FFFFFF;
    text-decoration: none;
    }
    .login-box A:hover {
    color:#a5a5a5;
    }
    .sbox {
    border:1px solid #494949;
    background-color:#494949;
    height:14px;
    width:220px;
    color:#ffffff;
    font-size:11px;
    margin:8px 0 0 37px;
    }
    .logbox {
    border:1px solid #494949;
    height: 15px;
    font-size:11px;
    margin:8px 0 0 0;
    }
    .logbut {
    border:1px solid #494949;
    font-size:11px;
    margin:8px 0 0 0;
    }
    .login-submit {
    border:1px solid #494949;
    background-color: #3d3d3d;
    color:#ffffff;
    font-size:11px;
    margin:8px 0 5px 0;
    }
    .sbutton{
    margin:5px 0 0 0;
    }
    #main {
    width:600px;
    margin:0;
    padding:0;
    }
    .index19 {
    background:url(./theme/default/images/index_19.png) no-repeat;
    width:900px;
    height:7px;
    margin:0;
    padding:0;
    }
    .sidebar-con {
    border: 1px solid #494949;
    width:290px;
    margin:10px 0 10px 0;
    float: right;
    }
    .sidebar-con2 {
    border: 1px solid #494949;
    width:590px;
    margin:10px 0 10px 0;
    float: left;
    }
    .sidebar-con3 {
    border: 1px solid #494949;
    width:290px;
    margin:10px 0 10px 0;
    float: left;
    }
    .sidebar-con4 {
    border: 1px solid #494949;
    width:893px;
    margin:10px 0 10px 2px;
    float: left;
    }
    .sidebar-title {
    background:url(./theme/default/images/new/sidebar-title.gif) no-repeat;
    width:290px;
    height:28px;
    }
    .sidebar-title2 {
    background:url(./theme/default/images/new/sidebar-title-2.gif) no-repeat;
    width:590px;
    height:28px;
    }
    .sidebar-title3 {
    background:url(./theme/default/images/new/sidebar-title-2.gif) no-repeat;
    width:290px;
    height:28px;
    }
    .sidebar-title4 {
    background:url(./theme/default/images/new/sidebar-title-3.gif) no-repeat;
    width:892px;
    height:28px;
    }
    .sidebar-title-text {
    padding: 6px 0 0 0;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    }
    .sidebar-con td {
    padding: 5px 0 5px 0;
    }
    .recentposts {
    padding: 2px 0 2px 0;
    }
    .smalltext {
    font-size: 9px;
    color: #D9AB18;
    }
    /*main content*/
    .rotator- {
    margin-top:10px;
    }
    .maincontentbg {
    background:#F1F1F1;
    width:600px;
    padding:0;
    float:left;
    }
    #footer {
    background:url(./theme/default/images/new/footer.gif) repeat-x;
    text-align:center;
    width:900px;
    height:52px;
    margin-top:10px;
    clear:both;
    }
    .input {
    border:1px solid #494949;
    background-color:#303030;
    height:14px;
    color:#000000;
    font-size:11px;
    }
    .button {
    border:1px solid #494949;
    background-color:#303030;
    color:#ffffff;
    font-size:11px;
    }
    #toolbar{
    display:block;
    width: 900px;
    height: 40px;
    float: left;
    padding: 0;
    margin: 0;
    background:url(./theme/default/images/new/toolbar.gif) repeat-x;
    }
    .clear{clear:both;height:10px;}
    </style>

    Alles anzeigen

    Lg

    Einmal editiert, zuletzt von wanted (15. Oktober 2009 um 06:50)

  • Stefan Kögl
    10
    Stefan Kögl
    Mitglied
    Reaktionen
    10
    Punkte
    1.010
    Beiträge
    199
    • 15. Oktober 2009 um 08:09
    • #4

    Vielleichst versuchst du deinen Code auf ein Minimum zu reduzieren. Wenn der Fehler dann noch immer auftritt, poste das erzeugte HTML nochmal (ohne PHP, das ist hier irrelevant).

  • wanted
    5
    wanted
    Mitglied
    Punkte
    195
    Beiträge
    30
    • 15. Oktober 2009 um 08:30
    • #5

    Welchen Code meinst du jetzt?
    Den Code von der Loginbox oder den Stylesheet?

    Welche soll ich auf das Minimum reduzieren?

  • Stefan Kögl
    10
    Stefan Kögl
    Mitglied
    Reaktionen
    10
    Punkte
    1.010
    Beiträge
    199
    • 15. Oktober 2009 um 08:32
    • #6
    Zitat von wanted

    Welche soll ich auf das Minimum reduzieren?

    Beide natürlich

  • MarvinTheRobot
    26
    MarvinTheRobot
    Mitglied
    Reaktionen
    53
    Punkte
    7.308
    Beiträge
    1.368
    • 15. Oktober 2009 um 09:15
    • #7

    ganz blöde idee... aber vielleicht mag FF keine bindestriche in CSS klassen...?

    Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders!
    http://www.chuckbronson.net/

  • Archonius
    4
    Archonius
    Mitglied
    Punkte
    125
    Beiträge
    25
    • 19. Oktober 2009 um 10:22
    • #8

    Soweit ich das mitbekommen habe zentrierst du den Inhalt mittels <div align="center">
    das ist seit html 4.0 veraltet und in XHTML 1.0 Strict nicht mehr erlaubt (benutze css stattdessen). Vlt. kommt der FF deswegen nicht damit klar (weil er sich brav an die regeln hält und der IE wie immer nicht :winking_face: )

    "Erfahrungen sammeln heißt Fehler begehen." - Herbert George Wells

  • josef19
    9
    josef19
    Mitglied
    Reaktionen
    9
    Punkte
    749
    Beiträge
    135
    • 19. Oktober 2009 um 13:33
    • #9

    Bitte Code prüfen auf:
    http://de.wikipedia.org/wiki/SQL-Injection
    http://de.wikipedia.org/wiki/Session_Hijacking
    http://de.wikipedia.org/wiki/Cross-Site_Scripting

    Da hat ja jedes Skriptkiddie Erfolg.
    http://de.wikipedia.org/wiki/Skriptkiddie

    Warum einfach, wenns kompliziert geht ! USB-CD-ROM mit USB-Stick emulieren

  • Blutsturz
    12
    Blutsturz
    Mitglied
    Reaktionen
    21
    Punkte
    1.351
    Beiträge
    261
    • 19. Oktober 2009 um 13:40
    • #10

    wieso entscheidest du dich eigentlich nicht entweder für inline definition oder externes stylesheet? beides gemischt ist grausslich :winking_face:

    "There's no such thing as Computer Science-it's witchcraft", math department of MIT, 1961

    You are all children of a worthless god!

  • wanted
    5
    wanted
    Mitglied
    Punkte
    195
    Beiträge
    30
    • 21. Oktober 2009 um 15:37
    • #11

    Hallo,

    Ich habe nicht vor die Seite irgendwie weiter groß aufzuziehen!
    Ich bin lediglich am testen von diversen Sachen wie bestimmte Funktionen reagieren etc. :)

    Deshalb kümmert es mich im Moment auch nicht wie die Stylesheet etc. aussieht!

    Liebe Grüße,

  • MarvinTheRobot
    26
    MarvinTheRobot
    Mitglied
    Reaktionen
    53
    Punkte
    7.308
    Beiträge
    1.368
    • 21. Oktober 2009 um 15:41
    • #12

    WTF? in deinem ersten post schreibst was von "du willst wissen warums anders aussieht" und jetz kümmerts dich nicht wie "die stylesheet" aussieht? mal schon daran gedacht dass saubere programmierung auch saubere darstellung bringt?

    Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders!
    http://www.chuckbronson.net/

  • Phonix
    1
    Phonix
    Mitglied
    Punkte
    5
    Beiträge
    1
    • 21. Oktober 2009 um 20:41
    • #13

    Hast du das Design etwa für IE angefertigt? Da solltest du aufpassen - IE hält sich nicht an die Richtlinien was korrekte Darstellung anbelangt.

  • spinball
    11
    spinball
    Mitglied
    Reaktionen
    67
    Punkte
    1.192
    Beiträge
    223
    • 21. Oktober 2009 um 21:57
    • #14

    Hallo, wanted! Es macht den Anschein, als wäre dein PHP-Code zu aufgeblasen. Kein Wunder, dass da niemand im Thread durchblickt. Man kann es leider sehr schlecht lesen aufgrund der Formatierung. Hier eine bessere, schönere Version, die wesentlich lesbarer ist:

    //Side LOGINBOX Copyright EliteLadders LTD
    if($_COOKIE[user]){ $member=mysql_fetch_array(mysql_query("SELECT * FROM members WHERE id='$_COOKIE[tid]' AND password='$_COOKIE[pass]'")); $newpm=array_pop(mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM messages WHERE toid='$_COOKIE[tid]' AND active=1 AND grid=1"))); $newin=array_pop(mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM messages WHERE toid='$_COOKIE[tid]' AND grid=2"))); $newfriends=array_pop(mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM friend_requests WHERE userid='$_COOKIE[tid]'"))); !$newfriends ? $currentf="$newfriends Friend Invites" : $currentf="<font color='red'><b>$newfriends Friend Invite".($newfriends>1 ? "s" : "")."</b></font>"; !$newpm ? $currentm="$newpm Unread Messages" : $currentm="<font color='red'><b>$newpm Unread Message".($newpm>1 ? "s" : "")."</b></font>"; !$newin ? $currentin="$newin Current Team Invites" : $currentm="<font color='green'><b>$newin Current Team Invite".($newin>1 ? "s" : "")."</b></font>"; echo"<div class='login-box'><br /><div align='center'><b>Welcome Back $member[name]!&nbsp;&nbsp;</b><br /><br /> <a href='./mailbox.php'>$currentm</a> &nbsp;&nbsp;<br /> <a href='./mailbox.php?action=invites'>$currentin</a> &nbsp;&nbsp;<br /> <a href='./mailbox.php?action=friends'>$currentf</a> &nbsp;&nbsp;<br /><br /> [<a href='./manager.php?action=manage'><span style='color:#FFFFFF;'>Team Manager</span></a>]<br /> [<a href='./manager.php'><span style='color:#FFFFFF;'>Profile Manager</span></a>] [<a href='./profile.php?account=$member[id]'><span style='color:#FFFFFF;'>My Profile</span></a>] [<a href='./login.php?act=logout'><span style='color:#FFFFFF;'>Logout</span></a>]&nbsp;&nbsp;</div></div>"; }else{ echo"<div class='login-box'><div align='center'></form><form method='post' action='./login.php'> <label for='login-username'>Username:</label><input type='text' class='logbox' name='login[name]' id='login-username' value='Username' maxlength='15' onClick=\"this.value=''\"><br /> <label for='login-password'>Password:</label><input type='password' class='logbox' name='login[pass]' id='login-password' value='Password' maxlength='20' onClick=\"this.value=''\"><br /> <label for='login-remember'>Remember:</label><select name='login[clength]' id='login-remember' class='logbut'> <option value='60'>1 Hour</option> <option value='1440'>1 Day</option> <option value='10080'>1 Week</option> <option value='43200'>1 Month</option> <option value='83200' selected='selected'>Forever</option></select><br /> <input type='hidden' name='act' value='setlogin'> <input type='submit' class='login-submit' name='submit' value='Login &gt;&gt;'><br /><a href='./register.php'>Register</a>&nbsp&nbsp<a href='./login.php'><font color='red'>Forgotten Password?</font></a></form></div></div>";}
    //End LOGINBOX

    PS: Einige if-Abfragen und Kommandos kann man der Übersicht zugunsten weglassen. Das Programm funktioniert trotzdem gleich. PHP halt. :wave:

  • wanted
    5
    wanted
    Mitglied
    Punkte
    195
    Beiträge
    30
    • 21. Oktober 2009 um 22:58
    • #15
    Zitat von MarvinTheRobot

    WTF? in deinem ersten post schreibst was von "du willst wissen warums anders aussieht" und jetz kümmerts dich nicht wie "die stylesheet" aussieht? mal schon daran gedacht dass saubere programmierung auch saubere darstellung bringt?

    tut mit leid ich dürfte mich falsch ausgedrückt haben! Natürlich ist mir die Stylesheet nicht egal nur denke ich mir bzw. habe ich mir gedacht,dass solange ich durchblicke dir Stylesheet schon so passt! Ich werd sie überarbeiten und übersichtlicher machen!


    spinball
    danke für deinen konstruktiven Beitrag! Wenn ich mal in den Keller lachen gehen sollte weiß ich ja welchen Beitrag ich als Witzvorlage nehmen kann! :)

    lg

  • Maximilian Rupp 27. Dezember 2024 um 00:26

    Hat das Thema aus dem Forum Programmieren nach Entwicklung verschoben.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

Benutzerkonto erstellen Anmelden

Tags

  • wtf

Rechtliches

Impressum

Datenschutzerklärung