0

I am just cleaning up some CSS for a client.

I am not a front-end person, but have been saved by bootstrap (thank you, twitter).

However, I am having a really hard time cleaning up a custom navigation panel (no twitter). I have provided the CSS below. I need it to be able to:

1) close gracefully at the end (the beginning starts with a vertical border, not an arrow. I would like the end to have symmetry and close the way it began).

2) Get the container to not expand to the end of the page.

3) I can't seem to get it to work in chrome. It falls apart in chrome but works in IE and Ff.

Here is the link. Any advice? Thanks so much.

http://annualdinnerdev.elasticbeanstalk.com/

 /* ------- Wizard Interface ---------- */

 #wizHeader
        {
            border: solid 3px #fff;
            margin-bottom:25px;
            -moz-box-shadow: 3px 3px 4px #C2CBCE;
            -webkit-box-shadow: 3px 3px 4px #C2CBCE;
            box-shadow: 3px 3px 4px #C2CBCE; /* For IE 8 */
            -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#C2CBCE')"; /* For IE 5.5 - 7 */
            filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color= '#C2CBCE' );

        }

        #wizHeader li label
        {
            font-size:x-large;
        }

        #wizHeader li a
        {
            font-size:large;
        }

        #wizHeader li .prevStep
        {
            background-color: #D6E6FA;
            color:#000;
        }
        #wizHeader li .prevStep:after
        {
            border-left-color: #D6E6FA !important;
        }
        #wizHeader li .currentStep
        {
            background-color: #6699CC;
            color:#fff;
        }
        #wizHeader li .currentStep:after
        {
            border-left-color: #6699CC !important;
        }
        #wizHeader li .nextStep
        {
            background-color: #F0E9EA;
            color:gray;
        }
        #wizHeader li .nextStep:after
        {
            border-left-color: #F0E9EA !important;
        }
        #wizHeader
        {
            list-style: none;
            overflow: hidden;
            font: 14px Helvetica, Arial, Sans-Serif;
            margin: 0px;
            padding: 0px;
        }
        #wizHeader li
        {
            float: left;
        }
        #wizHeader li a
        {
            color: white;
            text-decoration: none;
            padding: 10px 0 10px 55px;
            background: brown; /* fallback color */
            background: hsla(34,85%,35%,1);
            position: relative;
            display: block;
            float: left;
        }
        #wizHeader li a:after
        {
            content: " ";
            display: block;
            width: 0;
            height: 0;
            border-top: 50px solid transparent; /* Go big on the size, and let overflow hide */
            border-bottom: 50px solid transparent;
            border-left: 30px solid hsla(34,85%,35%,1);
            position: absolute;
            top: 50%;
            margin-top: -50px;
            left: 100%;
            z-index: 2;
        }
        #wizHeader li a:before
        {
            content: " ";
            display: block;
            width: 0;
            height: 0;
            border-top: 50px solid transparent;
            border-bottom: 50px solid transparent;
            border-left: 35px solid white;
            position: absolute;
            top: 50%;
            margin-top: -50px;
            margin-left: 1px;
            left: 100%;
            z-index: 1;
        }
        #wizHeader li:first-child a
        {
            padding-left: 10px;
        }
        #wizHeader li:last-child
        {
            padding-right: 18px;
        }
4

1 回答 1

0
  1. 向#wizHeader 添加背景颜色以创建右侧边框的视觉效果。
  2. 在#wizHeader 中指定一个宽度值,以防止它扩展到页面右侧。
  3. 对我来说似乎在 Chrome 上运行良好(最新版本)

以下是一些要添加到#wizHeader 的声明示例(将这些添加到当前在 CSS 声明中的声明)

 #wizHeader {
   background: #6699CC; 
   width: 960px; 
}

根据评论添加更多...

箭头向下移动的原因是因为 's 是块元素,向左浮动,所以它们会流动以适应可用的任何宽度,并在用完时下降到下一行。

如果你想切断最后一个箭头,你会通过瞄准目标获得更好的运气

  • 包裹最后一个。这对我有用,在 Chrome 的检查器中编辑:

    #wizHeader li:last-child {
      width: 172px; /* you might have to tweak this a bit*/
      overflow: hidden;
      padding-right: 0;
    } 
    

    然后,相应地更改#wizHeader 的宽度。930px 宽似乎可以用上面的代码片段解决问题。

  • 于 2012-09-27T20:50:27.987 回答