Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.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中获取此元素_Css_Wordpress - Fatal编程技术网

如何在css中获取此元素

如何在css中获取此元素,css,wordpress,Css,Wordpress,我正在使用wordpress和WPBakery建立一个网站。我试图为网页提供一种特定的样式,因此我需要访问网页的一个元素。 我需要做到的是这一点 为了让每一行在中心与特定的宽度对齐,我可以使用这个css代码 .RowInterior { width: 1000px; height: auto; margin: 0 auto; position: relative; } 但问题是,我不知道如何访问需要分配该规则的元素 这是网页的链接,在那里你会发现4个元素,类为“RowInterior

我正在使用wordpress和WPBakery建立一个网站。我试图为网页提供一种特定的样式,因此我需要访问网页的一个元素。 我需要做到的是这一点 为了让每一行在中心与特定的宽度对齐,我可以使用这个css代码

.RowInterior {
     width: 1000px;
height: auto;
margin: 0 auto;
position: relative;
}
但问题是,我不知道如何访问需要分配该规则的元素

这是网页的链接,在那里你会发现4个元素,类为“RowInterior”,我之前需要访问元素,类为“wpb_wrapper”。我通过WPBakery内的额外类名选项添加了类“RowInterior”

代码就是这样生成的

 <div data-vc-full-width="true" data-vc-full-width-init="true" data-vc- 
    stretch-content="true"
   class="vc_row wpb_row vc_row-fluid vc_custom_1565904278366 vc_row-has-fill 
    vc_row-no-padding"
   style="position: relative; left: -391.008px; box-sizing: border-box; width: 2352px;">
   <div class="wpb_column vc_column_container vc_col-sm-12 text-align-center">
      <div class="vc_column-inner">
         <div class="wpb_wrapper">
            <div class="vc_row wpb_row vc_inner vc_row-fluid RowInterior">


我需要使用“RowInterior”类访问元素上方的元素。

我刚刚访问了您的网站,访问了inspect元素,以便编辑您的css代码

只有两行代码可以帮助您:

.vc_column-inner{
   display: flex;
   justify-content: center;
}
vc\u column-inner
div
元素是父
div
wpb\u column-vc\u column\u容器vc\u coll-sm-12的子元素


希望这有帮助

您可以使用更具体的选择器,例如此选择器

.vc_custom_1565904278366 > .wpb_column > .vc_column-inner > .wpb_wrapper

请在您的问题本身中共享站点中的一部分目标代码。@ObsidManager更新了该问题