0

First of all, I'm not an expert on this, but I like trying to improve...

This is my problem http://kebax.dk/testdesign/?page=classes.

And here's the code behind

...
<body>
<div id="outercontainer">
    <div id="navpanel">
        <h3>Navigate:</h3>
        <a href="?page=home">Home</a><br />
        <a href="?page=generalinfo">General info</a><br />
        <a href="?page=classes">Classes</a><br />
        <a href="?page=skills">Skills &amp; Mounts</a><br />
        <a href="?page=proffs">Professions</a><br />
        <a href="?page=guild">Guild</a><br />
        <a href="?page=travel">Travelling</a><br />
        <a href="?page=aution">Auctionhouse</a><br />
        <a href="?page=pvp">PvP</a><br />
        <a href="?page=raids">Raids &amp; Roles</a><br /><br />
    </div>
    <div id="container">
        <?php
           php-include script
        ?>
        <span><center><hr />Copyright &copy;2011 my name</center></span>
    </div>
</div>
</body>
...

And here's the LESS style sheet:

h2 {
    font-family: 'Orbitron';
    font-weight: bold;
    color: #fff;
    .shadowtext(2px, 2px, 5px, #ddd);
}

h3 {
    font-family: 'Orbitron';
    font-weight: bold;
    color: #000;
    .shadowtext(2px, 2px, 5px, #333);
}

#outercontainer {
    width: 920px;
    min-height: 100%;
    margin-left:auto;
    margin-right:auto;
    margin-top:25px;
    margin-bottom: 25px;
    height:auto !important;
    height:100%;
    padding:0px;


    #navpanel {
        width: 150px;
        margin:auto;
        padding:5px;
        .rounded();
        background: @bgcolor_nav;
        position:relative;
        float:left;
        -webkit-border-top-right-radius: 0px;
        -moz-border-radius-topright: 0px;
        border-top-right-radius: 0px;
        .shadow(5px, 5px, 10px, #666);

        a, a:active {
            color: #fff;
            font-size: 9pt;
        }

        a:hover {
            color: #ccc;
            font-size: 9pt;
        }
    }

    #container {
        width: 750px;
        margin:auto;
        background: @bgcolor;
        font-size: 10pt;
        .rounded();
        padding: 5px;
        position:relative;
        .shadow(5px, 5px, 10px, #666);

        -webkit-border-top-left-radius: 0px;
        -moz-border-radius-topleft: 0px;
        border-top-left-radius: 0px;

        a, a:active {
            color: #fff;
            font-size: 12pt;
        }

        a:hover {
            color: #ccc;
            font-size: 12pt;
        }

        p {
            color: #fff;
            position:relative;
        }
        float:right;

        span {
            bottom:0px;
            position:relative;
            hr {
                height:1px;
                background:#000;
                border:0px;
                .shadow(2px, 2px, 2px, #666);
            }

        }

    }
}

#classpanel {
    border:1px solid black;
    width:150px;
    height:200px;
    position:relative;
    float:right;
    top:-220px;
    background:#000;

    a, a:active {
        color: #fff;
        font-size: 8pt;
    }

    a:hover {
        color: #ccc;
        font-size: 8pt;
    }
}

My problem is that this span at the bottom has to stay at the bottom no matter the contents of the page. But the classpanel div i inserted seems to be interfering with my copyright field. And here's how I want it to look like :)

=============================
| Header         ---------- |
| container      | class  | |
|    for         |  panel | |
|   contents     |        | |
|                ---------- |
|                           |
| ------------------------- |
|        Copyright span     |
=============================

I hope you can help me out...

4

1 回答 1

2

那个页面不是很好。

在 Chrome/Firefox 中进行测试,如果我添加clear: both到您的<center>标签 (???),页脚将移至底部。


你真的应该改变这个:

<span><center><hr />Copyright &copy;2011 Kristian Bak</center></span>

变成更像这样的东西:

<div id="footer" style="clear:both; border-top:1px solid #000; text-align: center; padding: 6px 0">
    Copyright &copy;2011 Kristian Bak
</div>

(显然使用样式表中的内联样式代替)

于 2011-01-31T15:54:10.147 回答