HTML /引导。填充顶部不起作用

时间:2016-02-28 10:46:10

标签: jquery html css twitter-bootstrap

html {
  font-family: sans-serif;
}

.wellpadding {
  padding-top: 20px;
}

.hero-slide {
  margin-top: -22px;
}

.caption {
  font-size: 75px; color: #fff;

}



.pcaption {
  font-size: 25px;
}

footer {
  background-color: #222222;

}

h6 {
  color: #fff;
}

.marketing {
  text-align: center;
}

.footer-con {
  margin-left: auto;
  margin-right: auto;

}

.marketing .span4 {
    text-align: center;
  }

p {
text-align: center;
  }

h4 {
  font-weight: bold;

  font-size: 30px;
}

a {
  color: #fff;
}

a:hover {
  color: #fff;
  text-decoration: none;
}
.unstyled {
color: #fff;
font-size: 13px;
text-decoration: none;
}

.boss {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  font-weight: bold;
}

.jumbotron {
  background-color: #222222;
  margin-bottom: -30px;

}

#jfont {
  color: #fff;
  font-weight: normal;
  text-align: center;

  margin-bottom: 20px;
}

.jumbotron-special {
  background-color: #ffffff;
}

.jumbotron-special-2 {
background-color: #e7e7e7;
}

.timeline {
    list-style: none;
    padding: 20px 0 20px;
    position: relative;
}

    .timeline:before {
        top: 0;
        bottom: 0;
        position: absolute;
        content: " ";
        width: 3px;
        background-color: #eeeeee;
        left: 50%;
        margin-left: -1.5px;
    }

    .timeline > li {
        margin-bottom: 20px;
        position: relative;
    }

        .timeline > li:before,
        .timeline > li:after {
            content: " ";
            display: table;
        }

        .timeline > li:after {
            clear: both;
        }

        .timeline > li:before,
        .timeline > li:after {
            content: " ";
            display: table;
        }

        .timeline > li:after {
            clear: both;
        }

        .timeline > li > .timeline-panel {
            width: 46%;
            float: left;
            border: 1px solid #d4d4d4;
            border-radius: 2px;
            padding: 20px;
            position: relative;
            -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
            box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
        }

            .timeline > li > .timeline-panel:before {
                position: absolute;
                top: 26px;
                right: -15px;
                display: inline-block;
                border-top: 15px solid transparent;
                border-left: 15px solid #ccc;
                border-right: 0 solid #ccc;
                border-bottom: 15px solid transparent;
                content: " ";
            }

            .timeline > li > .timeline-panel:after {
                position: absolute;
                top: 27px;
                right: -14px;
                display: inline-block;
                border-top: 14px solid transparent;
                border-left: 14px solid #fff;
                border-right: 0 solid #fff;
                border-bottom: 14px solid transparent;
                content: " ";
            }

        .timeline > li > .timeline-badge {
            color: #fff;
            width: 50px;
            height: 50px;
            line-height: 50px;
            font-size: 1.4em;
            text-align: center;
            position: absolute;
            top: 16px;
            left: 50%;
            margin-left: -25px;
            background-color: #999999;
            z-index: 100;
            border-top-right-radius: 50%;
            border-top-left-radius: 50%;
            border-bottom-right-radius: 50%;
            border-bottom-left-radius: 50%;
        }

            .timeline > li.timeline-inverted > .timeline-panel {
            float: right;
        }

            .timeline > li.timeline-inverted > .timeline-panel:before {
                border-left-width: 0;
                border-right-width: 15px;
                left: -15px;
                right: auto;
            }

            .timeline > li.timeline-inverted > .timeline-panel:after {
                border-left-width: 0;
                border-right-width: 14px;
                left: -14px;
                right: auto;
            }

h5 {
  font-size: 25px;
  text-align: left;
}
.padding-top-10 {
padding-top: 10px;
}




}
.timeline-title {
    margin-top: 0;
    color: inherit;
}

.timeline-body > p,
.timeline-body > ul {
    margin-bottom: 0;
    text-align: left;
}

.timeline-body > p + p {
        margin-top: 5px;
  }

.pleft {
  text-align: left;
}

.algemeen:hover {
  color: #000;

}

.algemeen {
  color: #000;
  text-decoration: underline;
}

#pfont {
  color: #fff;
  text-align: left;
  font-size: 13px;
}

.paddingb {
  padding-bottom: 10px;
}
<div class="container wellpadding">
    <div class="well">
        <center>
        <a href="#aboutModal" data-toggle="modal" data-target="#myModal"><img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRbezqZpEuwGSvitKy3wrwnth5kysKdRqBW54cAszm_wiutku3R" name="aboutme" width="140" height="140" class="img-circle"></a>

        <h3><?php echo $user['roepnaam']; ?> <?php echo $user['naam']; ?></h3>
        <em>Voor meer informatie, klik op de foto</em>
		</center>
    </div>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title" id="myModalLabel">More About Joe</h4>
                    </div>
                <div class="modal-body">
                    <center>
                    <img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRbezqZpEuwGSvitKy3wrwnth5kysKdRqBW54cAszm_wiutku3R" name="aboutme" width="140" height="140" border="0" class="img-circle"></a>
                    <h3 class="media-heading">Joe Sixpack <small>USA</small></h3>
                    <span><strong>Skills: </strong></span>
                        <span class="label label-warning">HTML5/CSS</span>
                        <span class="label label-info">Adobe CS 5.5</span>
                        <span class="label label-info">Microsoft Office</span>
                        <span class="label label-success">Windows XP, Vista, 7</span>
                    </center>
                    <hr>
                    <center>
                    <p class="text-left"><strong>Bio: </strong><br>
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sem dui, tempor sit amet commodo a, vulputate vel tellus.</p>
                    <br>
                    </center>
                </div>
                <div class="modal-footer">
                    <center>
                    <button type="button" class="btn btn-default" data-dismiss="modal">I've heard enough about Joe</button>
                    </center>
                </div>
            </div>
        </div>
    </div>
</div>

我正在努力使我在代码中使用的井从我在HTML文件中使用的轮播中移动一点点。但每次我尝试它都不会降低20px。但是,如果我使用类.padding-top-10它将向下移动,但是当我将该类更改为20px时;它不会再动了。有谁能帮我把我的油井20px降下来?我真的需要这样做。先谢谢

1 个答案:

答案 0 :(得分:0)

尝试使用margin而不是padding,如下所示:

<强> CSS

#myWell { margin-top: 20px; }

<强> HTML

<div class="container" id="myWell">
   <div class="well">
      ...
   </div>
</div>

jsFiddle Demo