Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
奇怪的CSS问题,带有边距';s_Css - Fatal编程技术网

奇怪的CSS问题,带有边距';s

奇怪的CSS问题,带有边距';s,css,Css,我对我正在设计的这个部分有一个奇怪的问题。。实际上,我有一个906px宽的容器元素,然后里面有四个跨度,应该并排排列,并且间隔均匀。。正在发生的是最后一个元素已流向新行。我尝试了last child和last of type的变体来解决这个问题,但我所做的一切都不起作用。我甚至求助于硬编码一个“last”类,右边距仍然适用于这段代码。有什么想法吗?请参阅下面的图片了解发生了什么 HTML 尝试将其添加到css中,并删除最后一个类 .internship-section:nth-child(4){

我对我正在设计的这个部分有一个奇怪的问题。。实际上,我有一个906px宽的容器元素,然后里面有四个跨度,应该并排排列,并且间隔均匀。。正在发生的是最后一个元素已流向新行。我尝试了last child和last of type的变体来解决这个问题,但我所做的一切都不起作用。我甚至求助于硬编码一个“last”类,右边距仍然适用于这段代码。有什么想法吗?请参阅下面的图片了解发生了什么

HTML


尝试将其添加到css中,并删除最后一个类

.internship-section:nth-child(4){
    margin-right:0px
}

您的代码有一个输入错误:

.internship-section h4{
    padding-top:15px;}
}
padding top
声明之后删除
}
,您应该是金色的。()


演示使用了
:last child
选择器。

不幸的是,这也不能解决问题。
.internship-section:nth-child(4){
    margin-right:0px
}
.internship-section h4{
    padding-top:15px;}
}