Avatar billede mstitdk Novice
13. juni 2008 - 00:04 Der er 3 kommentarer og
1 løsning

div id´s i php

Hey

jeg har denne her side

www.loekkenbrand.dk/test/Untitled-1.htm

hvorfor går der der ged i min news div kan ikke få den til opføre sig som min udryk div. men når jeg loader den i IE, og som i ser, ser den rigtig nok ud

CSS kode:
@charset "utf-8";
body  {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: justify; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    background-image: url(gfx/15690-baggrund.gif);
}
.twoColFixLtHdr #container {
    width: 780px;
    margin: 0 auto;
    text-align: left; /* this overrides the text-align: center on the body element. */
    background-color: #FFFFFF;
}
.twoColFixLtHdr #menu {
    height: 24px;
}
.twoColFixLtHdr #flash {
    width: 600px;
    height: 224px;
}
.twoColFixLtHdr  #spacertop {
    height: 10px;
    background-image: url(gfx/15690-baggrund.gif);
}
.twoColFixLtHdr #spaceline {
    height: 10px;
    background-image: url(gfx/15690-baggrund.gif);
}

.twoColFixLtHdr #header {
    height: 85px;
    background-image: url(gfx/topbaner.jpg);

}
.twoColFixLtHdr  #login {
    float: left; /* since this element is floated, a width must be given */
    width: 143px; /* the background color will be displayed for the length of the content in the column, but no further */
    padding: 0px 5px 5px 5px;
    margin: 10px 0 10px 5px;
    background-color: #F3F3F3;
    height: 236px;
}
.twoColFixLtHdr #news {
    float: right;
    margin: 230px -169px 0 0;
    width: 169px;
}



.twoColFixLtHdr  #Content {
    margin: 10px 0 0 165px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    width: 435px;
}
.twoColFixLtHdr #udryk {
    float: right;
    width: 169px;
    height: 210px;
    margin: 10px 5px 10px 0;
    background-color: #F3F3F3;
}

.twoColFixLtHdr #footer {
    text-align: center;
    height: 20px;
}
.twoColFixLtHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
    float: left;
    margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
Avatar billede olebole Juniormester
13. juni 2008 - 00:38 #1
<ole>

Det er i din HTML-kode, problemet ligger. Du kan ikke have flere elementer med samme id:

      <div id="MMMenuContainer0606202459_0">
        <div id="MMMenu0606202459_0" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuResetTimeout();"> ..... </div>
      </div>

- at det fungerer i IE er en fejl. Det burde det ikke. Løsningen er at finde en menu, der er skrevet i valid kode og derfor virker i begge browsere  =)

/mvh
</bole>
Avatar billede olebole Juniormester
13. juni 2008 - 00:38 #2
Undskyld, det var mig, der tog fejl. De har jo ikke samme id!  :D
Avatar billede mstitdk Novice
13. juni 2008 - 14:02 #3
det er nemlig ik i min html der problemmet.... det mine div id´s jeg lige skal have vent rigtigt
Avatar billede mstitdk Novice
25. juli 2008 - 21:33 #4
lukket
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester