Html 进行下拉选择以填充没有间隙的元素

Html 进行下拉选择以填充没有间隙的元素,html,css,web,bulma,Html,Css,Web,Bulma,我使用的菜单是由我们公司的其他开发人员创建的。我添加到菜单下拉选择的第一项,但问题是下拉框没有完全填充所有项目,我无法使其填充 以下是HTML: <div class="main-container-top-menu scroll1" id="main-container-top-menu"> <div class="top-menu-item-container-empty"> <di

我使用的菜单是由我们公司的其他开发人员创建的。我添加到菜单下拉选择的第一项,但问题是下拉框没有完全填充所有项目,我无法使其填充

以下是HTML:

<div class="main-container-top-menu scroll1" id="main-container-top-menu">
    <div class="top-menu-item-container-empty">
      <div style="width: 50px"></div>
    </div>
    
    


    
    <div class="top-menu-item-container">
      <div class="inactive-border-bottom">
          <p class="control has-icons-left is-expanded">
          <span class="select is-fullwidth ">
            <select class="full-height">
              <option>dropdown</option>
              <option>options 1</option>
            </select>                  
          </span>
          <span class="icon is-small is-left"><i class="far fa-building"></i></span>
        </p> 
        
        
      </div>
    </div>
    
     <div class="top-menu-item-container" >
        <div>
          <div class="top-menu-item">2. Lot and Model</div>
        </div>
    </div>   

    <div class="top-menu-item-container" >
      <div [className]="ishpExpanded?'active-border-bottom':'inactive-border-bottom'">
        <div class="top-menu-item">3. Home Plan</div>
      </div>
    </div>
  
    <div class="top-menu-item-container">
      <div [className]="isupgExpanded?'active-border-bottom':'inactive-border-bottom'">
        <div class="top-menu-item">4. Upgrades</div>
      </div>
    </div>
  
    <div class="top-menu-item-container">
      <div [className]="isnextExpanded?'active-border-bottom':'inactive-border-bottom'">
        <div class="top-menu-item">5. Next Steps</div>
      </div>
    </div>
    <div class="top-menu-icon-container">
      <i class="fas fa-print top-menu-icon"></i>
      <i class="fas fa-share-alt top-menu-icon"></i>
    </div>
  </div>
工作链接

如何制作下拉菜单以填补菜单空白

更新 文本移到左侧:


要获得所需的结果,您需要执行以下操作:

  • 非活动边框底部
    选择器中删除
    左填充:20px
    右填充:20px

  • 高度:100%
    添加到这些选择器-
    .control
    .select.is fullwidth

  • 需要在css中注册
    .full height
    ,并编写规则
    height:100%!重要信息
    <代码>!重要信息是必需的,因为此规则覆盖了
    中的
    高度:2.5em
    规则。选择select


  • 你的问题是
    padding
    在这里-
    .control.has-icons-left.input.control.has-icons-left.select{padding left:2.5em;}
    Sergey,谢谢你的帖子,但我的问题不是选择中的文本,我希望选择元素填充父元素。我更正了它。像这样还是像这样谢谢,太棒了!是否有任何选项可防止文本向左移动?我想把它放在中间。下拉列表中显示的文本是什么?请出示截图。因为我的文本居中。请尝试
    text align last:center
    for
    。select.is-fullwidth select
    随时乐意提供帮助
    .scroll1::-webkit-scrollbar {
        width: 0px;
        height: 3px;
      }
      
      .scroll1::-webkit-scrollbar-track {
        background: #eff0f0;
      }
      
      .scroll1::-webkit-scrollbar-thumb {
        background: #666;
      }
      .main-container-top-menu {
        scrollbar-width: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
     
      }
      
      .top-menu-item-container-empty {
        border-bottom: 2px solid #eff0f0;
        font-family: "Roboto", sans-serif;
        border-right: 2px solid #eff0f0;
        box-sizing: border-box;
        color: #626262;
        font-size: 14px;
        font-weight: 350;
        user-select: none;
        justify-content: space-between;
      }
      .top-menu-item-container {
        border-bottom: 2px solid #eff0f0;
        font-family: "Roboto", sans-serif;
        border-right: 2px solid #eff0f0;
        box-sizing: border-box;
        color: #626262;
        font-size: 14px;
        font-weight: 350;
        user-select: none;
        flex: 1;
        justify-content: space-between;
      }
      .active-border-bottom {
        align-items: center;
        display: flex;
        padding-left: 20px;
        padding-right: 20px;
        height: 100%;
        border-bottom: 3px solid #eb2028;
        box-sizing: border-box;
      }
      .inactive-border-bottom {
        align-items: center;
        display: flex;
        padding-left: 20px;
        padding-right: 20px;
        height: 100%;
      }
      .top-menu-item-active {
        cursor: pointer;
        font-family: "Roboto", sans-serif;
        padding: 5px;
        font-family: "Roboto", sans-serif;
        box-sizing: border-box;
        color: #1d1d1d;
        font-size: 14px;
        font-weight: 350;
        user-select: none;
        align-items: center;
        justify-content: center;
        display: flex;
        stroke-width: 0.6px;
        -webkit-text-stroke-width: 0.6px;
        flex: 1;
      }
      .top-menu-item {
        cursor: pointer;
        padding: 10px;
        font-family: "Roboto", sans-serif;
        box-sizing: border-box;
        color: #626262;
        font-size: 14px;
        user-select: none;
        align-items: center;
        justify-content: center;
        display: flex;
        flex: 1;
      }
      
      .top-menu-item-first {
        cursor: default;
        border-right: 2px solid #eff0f0;
        font-size: 14px;
        padding-right: 20px;
        font-weight: 800;
        border-bottom: 2px solid #eff0f0;
        border-left: none;
        text-align: left;
        justify-content: left;
        flex: 1;
      }
      
      .top-right-menu-item {
        /* margin-right: 50px; */
        border-bottom: 2px solid #eff0f0;
        height: 100%;
        display: inline-flex;
        justify-content: flex-end;
        align-items: center;
      }
      
      .top-item-logo {
        height: 55px;
        z-index: 100;
        width: 55px;
        object-fit: contain;
      }
      
      .top-menu-icon-container{
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .top-menu-icon {
        cursor: pointer;
        margin-right: 25px;
        margin-left: 25px;
        cursor: pointer;
        width: 14px;
        padding-top: 25px;
        padding-bottom: 25px;
      }
      
      .left-arrow,
      .right-arrow {
        display: none;
      }
      
      @media screen and (max-width: 768px) {
        .constructor-top-container {
          justify-content: center;
          padding-left: 3%;
        }
      }
      
      @media screen and (max-width: 1088px) {
        .top-right-menu-item {
          padding-left: 10px;
          margin-right: 0px;
          border-bottom: 2px solid #eff0f0;
          flex: 1;
          height: 100%;
          display: inline-flex;
          justify-content: flex-end;
          align-items: center;
        }
      
        .main-container-top-menu {
          padding-left: 0;
          padding-right: 0;
          padding-bottom: 3px;
        }
      }
      
      @media screen and (max-width: 414px) {
        .top-menu-icon {
          margin-right: 15px;
          cursor: pointer;
          width: 14px;
          padding-top: 12px;
        }
        .scroll1::-webkit-scrollbar {
          width: 0px;
          height: 0px;
        }
      
        .scroll1::-webkit-scrollbar-track {
          background: #eff0f0;
        }
      
        .scroll1::-webkit-scrollbar-thumb {
          background: #666;
        }
        .top-menu-item-first {
          padding-left: 35px;
        }
      
        .main-container-top-menu {
          transition: 0.2s all;
          min-height: 62px;
        }
        .top-item-logo {
          position: absolute;
          top: 0;
          right: 0px;
          margin: 0;
          padding: 0;
          z-index: 100;
          height: 62px;
          width: 62px;
          object-fit: contain;
        }
      
        .left-arrow {
          height: 60px;
          padding-left: 5px;
          padding-right: 5px;
          background: white;
          display: flex;
          align-items: center;
          position: absolute;
          cursor: pointer;
          color: #d1d1d1;
          top: 0px;
          font-size: 1.6rem;
          left: 0;
          z-index: 5;
          padding-left: 7px;
        }
      
        .right-arrow {
          height: 60px;
          padding-left: 5px;
          padding-right: 5px;
          background: white;
          display: flex;
          align-items: center;
          position: absolute;
          cursor: pointer;
          color: #b1b1b1;
          font-size: 1.6rem;
          left: calc(100% - 88px);
        }
      }
      @media screen and (max-width: 1088px) {
        .main-container-top-menu {
          overflow-x: auto;
          overflow-y: hidden;
          /* display: block; */
          width: 100%;
          white-space: nowrap !important;
        }
      }
      
      @media screen and (max-width: 414px) {
        .main-container {
          padding-left: 0px;
          padding-right: 0px;
        }
      }
      
      .no-suite-title {
        text-transform: uppercase;
        font-size: 1.3em;
        font-weight: 300;
        position: absolute;
        left: 10%;
        top: 50%;
        z-index: 1000;
      }