Avatar billede gadebarnet Nybegynder
01. april 2005 - 10:10 Der er 1 kommentar

Faneblads ting. hjælp til span

---code---
<style>
.fanemed {
    border: 1px solid #aeacad;
    border-bottom-color: White;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    height:15px;
    width:100px;
}

.faneuden {
border: 1px solid #aeacad;
    height:15px;
    width:100px;
}

.faneind {
background-color: white;
   
    padding-left: 3px;
    padding-right: 3px;
    padding-top: 3px;
    height:18px;
}
.exc {
background-image: url(images\fanebag.gif);
height:15px;
width:100px;
font-family: Arial ;font-size: 11px;font-weight: bolder;text-align:center;
}
</style>


<br><br><br>




<span class=fanemed><span class=faneind><span class=exc>fane1</span></span></span>
<span class=faneuden><span class=faneind><span class=exc>fane2</span></span></span>




---------------


Jeg vil gerne have 15px denne farve: #aeacad til at være i bunden og 15px i venstre og højre side, så det giver indtryk af faneblade...

Men jeg kan sku ikke finde ud af det...
Avatar billede Slettet bruger
01. april 2005 - 22:18 #1
Jeg må erkende atjeg ikke helt forstår dit spm.-
Men jeg lægger lige et fanebladscript, måske kan du bruge noget fra dette.
................
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>faneblad3</title>

  <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1">
  <script type="text/javascript">

    var ver3 = (navigator.appVersion.charAt(0) <= "3") ? true : false;
    var dom = (document.getElementById) ? true : false;
    var ie4 = (document.all && !document.getElementById) ? true : false;
    var ns4 = (document.layers) ? true : false;
    var ie5 = (document.all && document.getElementById) ? true : false;
    var n6 = (document.getElementById && !document.all) ? true : false;
   
    function findObjekt(objekt) {
        var blok;
        if (dom) blok = document.getElementById(objekt).style;
      else if (ie4) blok = document.all[objekt].style;
      else if (ns4) blok = document.layers[objekt];
      return blok;
    }
   
    function setBgColor(objekt, color) {
    var blok = findObjekt(objekt);
        blok.backgroundColor = color;
    }
    function setFgColor(objekt,color) {
    var blok = findObjekt(objekt);
        blok.color = color;
    }
    function visObjekt(objekt){
    var blok = findObjekt(objekt);
        blok.visibility = "visible";
    }
    function skjulObjekt(objekt){
    var blok = findObjekt(objekt);   
        blok.visibility = "hidden";
    }
    function expand(objekt){
    var blok = findObjekt(objekt);
        blok.display="block"
    }
    function collapse(objekt){
    var blok = findObjekt(objekt);
        blok.display="none"
    }
    function setBorderBottomColor(objekt,color){
    var blok = findObjekt(objekt);
        blok.borderBottomColor = color;
    }
    function setBorderBottomWidth(objekt,width){
    var blok = findObjekt(objekt);
        blok.borderBottomWidth = width;
    }
   
    function skjulAlle(){
    for (i=1;i<4;i++)
        collapse('indhold'+i)
    }
   
    function resetColors(){
    for (i=1;i<4;i++){
      setBgColor('indhold' + i,'#fff');
      setBgColor('menupunkt' + i,'#cc0')
      setBorderBottomColor('menupunkt'+i,'black');
    }
    }
    function visIndhold(nr) {
      skjulAlle();
      resetColors();
      expand('indhold'+nr);
      setBgColor('menupunkt' + nr,'#eee');
      setBgColor('indhold' + nr,'#eee');
      setBorderBottomColor('menupunkt'+nr,'#eee');
    }
  </script>

<style type="text/css">

body  {
margin-left: 0px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 0px;
padding-left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
background:#999900;
font-family:arial, helvetica,sans-serif;
text-align:center;
line-height:115%;
font-size:14px;
}
   
#menuholder  {
position: relative;
width: 750px;

padding: 0px;
margin: 0px auto;
border-left: 1px solid black;
z-index: 10;
}

#menuholder .menupunkt  {
position: absolute;
padding-left: 0px;
padding-top: 4px;
padding-right: 0px;
padding-bottom: 4px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
color: black;
text-decoration: none;
text-align: center;
font-size: 12px;
font-weight: bold;
}
       
#menupunkt1  {
left: 1px;
width: 249px;
border: 1px solid black;
border-left: 0px
}
   
#menupunkt2  {
left: 250px;
width: 249px;
border: 1px solid black;
}   

#menupunkt3  {
left: 500px;
width: 248px;
border: 1px solid black;
border-right: 0px
}

.indhold  {
position: relative;
z-index: 5;
top: 0px;
width: 748px;
height: 500px;
margin: 0px auto;
text-align: left;
display:none;
overflow:auto;
padding-bottom:10px;
cursor:default;
border: 1px solid black;
}

.tabel{
width: 760px;
margin-left:auto;
margin-right:auto;
text-align:center;

}

</style>
</head>

<body onload="visIndhold(1)">

<table summary="" class="tabel">
<tr><td>

<!-- Fanebladshoved -->

<div id="menuholder">
<a class="menupunkt" id="menupunkt1" onfocus="this.blur()" href="java script:visIndhold(1)">Fane 1</a>
<a class="menupunkt" id="menupunkt2" onfocus="this.blur()" href="java script:visIndhold(2)">Fane 2</a>
<a class="menupunkt" id="menupunkt3" onfocus="this.blur()" href="java script:visIndhold(3)">Fane 3</a>

</div>
   
<!-- Fane 1 -->
<div id="indhold1" class="indhold">
<br /><br />
<TABLE BORDER="0" CELLPADDING="10" width="100%">
<TR><TD>

Side indhold for fane 1, sættes ind her!

</TD></TR></TABLE>
</div>

<!-- Fane 2 -->   
<div id="indhold2" class="indhold">
<br /><br />
<TABLE BORDER="0" CELLPADDING="10" width="100%">
<TR><TD>

Side indhold for fane 2, sættes ind her!

</TD></TR></TABLE>
</div>

<!-- Fane 3 -->   
<div id="indhold3" class="indhold">
<br /><br />
<TABLE BORDER="0" CELLPADDING="10" width="100%"><TR><TD>

Side indhold for fane 3, sættes ind her!

</TD></TR></TABLE>
</div>

<!-- Afslutning -->
</td></tr>
</table>

</body>
</html>
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

Seneste spørgsmål Seneste aktivitet
I dag 10:21 Ny printer, men hvilken Af mort1 i Printere
I går 19:41 USB på Linux Af Uvanga i Linux
12/0818:26 Hvilken type mus Af mort1 i PC
11/0813:21 ms Forms Af leahcim i Andet software
10/0821:30 Blokeret på Snapchat? Af LineP i Chat & Messaging