【问题标题】:I want the "About me button to be on the top right hand side without moving the navigation bar我希望“关于我”按钮位于右上角而不移动导航栏
【发布时间】:2015-05-05 12:18:22
【问题描述】:

这是我的 CSS:

    <style>
    .imageBox {

            float: right;
        }
        .imageBox .hoverImg {
           position: relative;
            left: 0;
            top: 0;
            display: none;
            margin-right: 100px;
        }
        .imageBox:hover .hoverImg {
            display: block;
        }
     ul{ font-family: impact; font-size: 90px; list-style: none;}
        .div3{
    float:right;
    width:200px;
    height:200px;
    margin-top: 50px;
    margin-right: 500px;



    }
    a { color: #fff;}
    a:hover{color:orange; font-size: 100px;}
    </style>

HTML:

  </head>

    <body background="NEWW.png">
this is my HTML:
    <div class="div3">
    <UL>

    <LI><a href="color.html">HOME</a></LI>
    <LI><a href="layout.html">ARTICLES</a></LI>
    <LI><a href="myform.html">CONTACT </a></LI>

    <UL>
    <div>
    <div class="imageBox">
    <div class="imageInn">
        <img src="aboutx.png">
    </div>
    <div class="hoverImg">
        <img src="about.png">
    </div>
</div>

我希望我的关于按钮位于右上角,而无需将导航栏移动到任何地方。 我一整天都在想这个。

【问题讨论】:

  • 标记中没有按钮?
  • 你能创建一个JSFiddle吗

标签: javascript jquery html css


【解决方案1】:

尝试位置:绝对;顶部:5px;右:5px;对于您要定位的元素。 您应该根据需要使用 css 创建按钮和样式。

【讨论】:

    猜你喜欢
    • 2019-08-30
    • 1970-01-01
    • 1970-01-01
    • 2021-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-14
    相关资源
    最近更新 更多