填充不起作用,但保证金确实

时间:2015-05-02 10:23:05

标签: html5 css3 paragraph

**我在10之后得到一个div中的文本,但是由于某种原因,填充不起作用。所以,如果有人能告诉我什么是错的???它是一个html5任务栏/连续10个图像,我需要时注释掉。 **

HTML5:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Waylon's Unturned</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../css/main.css" type="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="body">
    <header class="mainHeader">
        <img src="../img/logo.jpg">
        <nav><ul>
        <nav><ul>
            <li><a href="../index.html">Home</a></li>
            <li class="active"><a href="../other_pages/donate.html">Donate</a></li>
            <li><a href="http://waylonsunturned.boards.net">Forum</a></li>
            <li><a href="../other_pages/contact.html">Contact</a></li>
        </ul></nav>
    </header>
    <div class="mainContent">
        <div class="content">   
                <article class="topcontent">    
                    <header>
                        <h2>About donations</h2>
                    </header>
                    <content>
                        <p>Thank you for considering a donation, all of the donations will be used to improve the server, website and forum.</p>
                            <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
                                <input type="hidden" name="cmd" value="_s-xclick">
                                <input type="hidden" name="hosted_button_id" value="BF766GY6YY8XN">
                                <input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
                                <img alt="" border="0" src="https://www.paypalobjects.com/nl_NL/i/scr/pixel.gif" width="0" height="0">
                            </form>
                    </content>

            <h1><center><tt><b>Our Donation Goal :</b></tt></center></h1>
            <p>We try to get 30 euro's each month to keep all of our servers, the website and the forums running.</p>

                    <div class="taskbardiv">
                    <img class="taskbar" src="../img/loadingbarblack.png" width="1" height="40">
                    <!--<img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">    
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">    
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">
                    <img class="taskbar" src="../img/loadingbar.png" width="40" height="40">--> 
                    <p class="taskbarp">0% Complete</p>
                    </div>
                </article>
        </div>
</body>
</html>

CSS3:

.taskbarp{
    color: #82a213;
    float: right;
    font-size: 5;
    padding-left: 20px;
    margin: 10;
}


.taskbar{
    border-radius: 5px;
}

.taskbardiv{
    background: black;
    border-radius: 10px;
    padding-top: 6px;
}

1 个答案:

答案 0 :(得分:0)

我会尽力帮助,虽然我不知道我是否真的理解你的问题:

  1. 在CSS中工作时,始终使用测量值(如px,em或%)!您的字体大小和边距都会丢失,因此浏览器会忽略它们。
  2. 两个填充都按预期工作,但当您将文本浮动到容器的右侧时,填充左边没有多大意义。
  3. 这就是我现在所能看到的一切,希望能帮到你。