Style.css does not change

时间:2019-01-07 13:22:02

标签: html web styles

I am having a problem with my style.css I am trying to create a white box be hide the text but it does not update, any help would be helpful.

#advantages{
	text-align: center;
}
#advantages .box {
	background: #ffffff;
	margin: 0 0 30px;
	border: solid 1px #e6e6e6;
	box-sizing: border-box;
	padding: 20px;
	box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
}
<div class="advantages"><!-- advantages Begin -->
		<div class="container"><!-- container Begin -->
			<div class="same-height-row"><!-- same-height-row Begin -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-heart"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">We Love Our Products</a></h3>
						 <p>We know to provide the best posible product ever</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-tag"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">Best Prices</a></h3>
						 <p>Compare us with another site, who have the best prices.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-thumbs-up"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">100% Original Products</a></h3>
						 <p>We just offer you the best and original products.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				
			</div><!-- same-height-row Finished -->
		</div><!-- container Finished -->
	</div><!-- advantages Finished -->

I want their to be a white box be hide the text but instead nothing changes

3 个答案:

答案 0 :(得分:0)

Advantages is a class so we use '.' for class and '#' for id, so replace

    #advantages

with

   .advantages

答案 1 :(得分:0)

   <style>
.advantages{
	text-align: center;
}
.advantages .box {
	background: #fff;
	margin: 0 0 30px;
	border: solid 1px #e6e6e6;
	box-sizing: border-box;
	padding: 20px;
	box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
}

</style>
<div class="advantages"><!-- advantages Begin -->
		<div class="container"><!-- container Begin -->
			<div class="same-height-row"><!-- same-height-row Begin -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-heart"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">We Love Our Products</a></h3>
						 <p>We know to provide the best posible product ever</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-tag"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">Best Prices</a></h3>
						 <p>Compare us with another site, who have the best prices.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				<div class="col-sm-4"><!-- col-sm-4 Begin -->
					<div class="box same-height"><!-- box same-height Begin -->
						<div class="icon"><!-- icon Begin -->
							<i class="fa fa-thumbs-up"></i>
						</div><!-- icon Finished -->
						 <h3><a href="#">100% Original Products</a></h3>
						 <p>We just offer you the best and original products.</p>
					</div><!-- box same-height Finished -->
				</div><!-- col-sm-4 Finished -->
				
			</div><!-- same-height-row Finished -->
		</div><!-- container Finished -->
	</div><!-- advantages Finished -->

答案 2 :(得分:0)

尝试关注CSS。...

.advantages{
    text-align: center;
}
.advantages .box {
    background: #ffffff;
    margin: 0 0 30px;
    border: solid 1px #e6e6e6;
    box-sizing: border-box;
    padding: 20px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, .3);
}