Avatar billede fredand Forsker
03. september 2004 - 07:47 Der er 2 kommentarer og
1 løsning

Tab-design

Fredrik

Hello
It to create tab-design with CSS but I cant get the tabs againts the sheet. I you try the code below you will see 2 pixels distance under the tabs.

So if any one got an idea of how to put them closer toghter please let me know.

Best regards
Fredrik

<!DOCTYPE html PUBLIC "-//golem.ph.utexas.edu//DTD XHTML 1.1 plus Target 1.0//EN" "http://golem.ph.utexas.edu/DTD/xhtml11-target.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>CSS TEST</title>
        <style>
            .CENTER
            {
                text-align: center;
            }

            .TAB_CLOSED_LEFT
            {
                display:block;
                border-top: black 1px outset;
                border-left: black 1px solid;
                /*border-right: 1px solid #FF0000;*/



            }

            .TAB_CLOSED_RIGHT
            {
                display:block;
                border-top: black 1px outset;
                border-right: black 1px solid;
                /*border-left: 1px solid #FF0000;*/



            }

            .TAB_OPEN
            {
                display:block;
                border-top: black 1px solid;
                border-right: black 1px solid;
                border-left: black 1px solid;
                border-bottom-width: 0px;
                padding-left: 5px;
                padding-right: 5px;
                padding-bottom: 0px;
                margin-bottom: 0px;



            }

            .TAB_TABLE
            {
                font-family: verdana;
                color: black;
                font-size: 10px;
                font-weight: normal;
                text-align: left;

                margin: 0px 0px 0px 0px;
                padding-bottom: 0px;
                margin-bottom: 0px;


                /*border-collapse: collapse;*/


            }

            .PRODUCT_TABLE
            {
                display:block;
                border: black 1px outset;
                border-color: #000000;
                /*border-top: 20px solid #000066;*/
                font-family: verdana;
                color: black;
                font-size: 10px;
                font-weight: normal;
                text-align: left;
                padding-top: 0px;
                margin-top: 0px;
                width: 400px;
            }
        </style>
      </head>
    <body>
        <div class="CENTER">
            <table>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td valign= "top">

                                    <table class="TAB_TABLE">
                                        <tr>
                                            <td class="TAB_CLOSED_LEFT">
                                                <a href="a.html" class="AHREF">Tab 1</a>
                                            </td>

                                            <td class="TAB_OPEN">
                                                <a href="b.html" class="AHREF">Tab 2</a>
                                            </td>

                                            <td class="TAB_CLOSED_RIGHT">
                                                <a href="c.html" class="AHREF">Tab 3</a>
                                            </td>
                                        </tr>
                                    </table>

                                    <table class="PRODUCT_TABLE">
                                        <tr>
                                            <td valign="bottom">
                                                <b>A Product</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top">
                                                Bla bla bla
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top">
                                                <a href="d.html" target="_blank">Read more &gt;&gt;</a>
                                            </td>
                                        </tr>
                                    </table>

                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>
Avatar billede morteeart Nybegynder
03. september 2004 - 08:30 #1
First of all, you should try testing your code in another browser than IE.
because it looks totaly fucked up, in Firefox.

But to remove the space, put cellspacing="0" cellpadding="0" on your <table> tag.
exp:

<table cellspacing="0" cellpadding="0">
...
Avatar billede fredand Forsker
03. september 2004 - 09:18 #2
Thanks mate!

Please give a svar so I can reward you!
/Fredrik
Avatar billede morteeart Nybegynder
03. september 2004 - 09:20 #3
:~)
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