Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Vertical CSS Menu in ASP.NET

Vertical CSS Menu in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestionhtmlcss
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MWRivera
    wrote on last edited by
    #1

    Hi All, I'm creating a web application in ASP.NET and c#. What I'm trying to do is create a vertical menu similar to the blue one in this link: http://www.alistapart.com/articles/taminglists/ I've created these menus in the past but in just a plain HTML page not ASP.NET. When I try to apply the same format to the unorder list the look isn't the same so I was trying to create it using LinkButtons like so:

    <span class="subMenuDiv">
    <asp:LinkButton ID="link1" runat="server" CssClass="subMenu" Text="Case Info"></asp:LinkButton>
    <asp:LinkButton ID="link2" runat="server" CssClass="subMenu" Text="Reportable Info"></asp:LinkButton>
    </span>

    The CSS looks like this:

    .subMenuDiv {
    float: right;
    width: 120px;
    padding: 0 0 0 0;
    border: none;
    margin: 0;}

    .subMenu {
    width: 100%;
    margin: 0;
    padding: 4px 10px 4px 10px;
    text-decoration: none;
    background-color: #CCCC99;
    border: solid 1px black;
    color: #666633;
    text-align: left;}

    The problem I'm having is the border of the subMenu is showing up twice, i'm not sure why but I know the padding is linked to it. How do I get it so the border only shows on the outer edge of the linkButtons (subMenu items) and so only one border is shown? Any help would be great. Thanks

    N 1 Reply Last reply
    0
    • M MWRivera

      Hi All, I'm creating a web application in ASP.NET and c#. What I'm trying to do is create a vertical menu similar to the blue one in this link: http://www.alistapart.com/articles/taminglists/ I've created these menus in the past but in just a plain HTML page not ASP.NET. When I try to apply the same format to the unorder list the look isn't the same so I was trying to create it using LinkButtons like so:

      <span class="subMenuDiv">
      <asp:LinkButton ID="link1" runat="server" CssClass="subMenu" Text="Case Info"></asp:LinkButton>
      <asp:LinkButton ID="link2" runat="server" CssClass="subMenu" Text="Reportable Info"></asp:LinkButton>
      </span>

      The CSS looks like this:

      .subMenuDiv {
      float: right;
      width: 120px;
      padding: 0 0 0 0;
      border: none;
      margin: 0;}

      .subMenu {
      width: 100%;
      margin: 0;
      padding: 4px 10px 4px 10px;
      text-decoration: none;
      background-color: #CCCC99;
      border: solid 1px black;
      color: #666633;
      text-align: left;}

      The problem I'm having is the border of the subMenu is showing up twice, i'm not sure why but I know the padding is linked to it. How do I get it so the border only shows on the outer edge of the linkButtons (subMenu items) and so only one border is shown? Any help would be great. Thanks

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Do not repost the same question to multiple forums. You have asked this yesterday in the .net framework forum.


      I know the language. I've read a book. - _Madmatt

      M 1 Reply Last reply
      0
      • N Not Active

        Do not repost the same question to multiple forums. You have asked this yesterday in the .net framework forum.


        I know the language. I've read a book. - _Madmatt

        M Offline
        M Offline
        MWRivera
        wrote on last edited by
        #3

        Sorry for the report, I forgot about the ASP.NET message board and posted in the .NET instead. I'd like to remove it from the .NET message board if possible. Thanks

        N 1 Reply Last reply
        0
        • M MWRivera

          Sorry for the report, I forgot about the ASP.NET message board and posted in the .NET instead. I'd like to remove it from the .NET message board if possible. Thanks

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^] 6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.


          I know the language. I've read a book. - _Madmatt

          C 1 Reply Last reply
          0
          • N Not Active

            http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^] 6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.


            I know the language. I've read a book. - _Madmatt

            C Offline
            C Offline
            chengclq
            wrote on last edited by
            #5

            haved looking ,thank you very manch.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups