The alignment of hyperlinks with display block cannot be maintained in a horizontal position

I am struggling to align a group of hyperlinks horizontally within a td element. Currently, they are displaying vertically due to my use of

 display : block;

While I understand that using ul and li elements would be the proper way to achieve this, I am looking for an alternative solution. Is there a way to align these hyperlinks next to each other without restructuring my HTML?

This is the CSS I am currently using:

   .homehyperlink {
        width:90px;
        height:50px;
        color:#CCCCCC;
        text-align:center;
        line-height: 50px;
        display: block;
        font-size: large;
        font-weight: 700;
        font-family:'Palatino Linotype';
    }
    .homehyperlink:hover {
        width:90px;
        height:50px;
        color:#FFFFFF;
        text-align:center;
        line-height: 50px;
        display: block;
        background-color:#FB2020;
        font-weight:bolder;
        font-family:'Palatino Linotype';
    }
    .homehyperlink:active {
        width:90px;
        height:50px;
        color:#FFFFFF;
        text-align:center;
        line-height: 50px;
        display: block;
        background-color:#FB2020;
        font-weight:bolder;
        position: relative;
        top: 1px;
        font-family:'Palatino Linotype';
      }
        .munmaintable1234 {
        text-align:left;
        background-color: #333333;
        height:50px;
      }

Below is how I have structured the links:

   <td class="munmaintable1234" colspan="4">

                        <asp:HyperLink ID="HyperLink4" runat="server" class="homehyperlink" NavigateUrl="~/test.aspx">HOME</asp:HyperLink>
                        <asp:HyperLink ID="HyperLink1" runat="server" class="homehyperlink" NavigateUrl="~/test.aspx">HOME</asp:HyperLink>
                        <asp:HyperLink ID="HyperLink2" runat="server" class="homehyperlink" NavigateUrl="~/test.aspx">HOME</asp:HyperLink>
                        <asp:HyperLink ID="HyperLink3" runat="server" class="homehyperlink" NavigateUrl="~/test.aspx">HOME</asp:HyperLink>

                    </td>

Answer №1

Modify

visibility:hidden

to

visibility:visible

Within

.mainNavButton

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips on placing two transparent images so they overlap at diagonal corners of a container element

A print graphic designer provided me with a PSD comp that I'm unsure about translating to the web. I already have a black-bordered, round-corner container in place. There are multiple z-indexed divs on the page, making it difficult to determine stac ...

Design featuring a fixed top row and a scrollable bottom row

I need to divide a div container into two vertical sections, one occupying 60% of the space and the other 40%. The top div (60%) should always be visible, while the bottom div (40%) should be scrollable if it exceeds its limit. I have tried different app ...

Include ellipses for child elements within a parent div set to a specific height

I need help with a design issue involving a parent div that has a fixed height, overflow hidden, and multiple child divs inside. How can I display an ellipsis after the visible child divs to indicate that there are more divs present? Here is the code I ha ...

Place two divs side by side with the second div filling up the remaining space on the line

Hello there, can anyone lend a hand with this problem? This is the code I have been working with: <html> <body> <div style="width=100%"> <div style="float:left; background-color:Red; height:100px">Red</div> <div st ...

Utilize jQuery to find elements based on a specific attribute containing a certain value

I need help targeting specific attributes in links to append classes based on the file extension. My page displays various types of files, from images to .ppt files. I am using ASP.NET MVC and jQuery for this project. <a class="screenshot" title="" fil ...

Converting Numerical Formats into Numbers: A Step-By-Step

How can I format numbers in JavaScript as 1,000,000 without being able to use the operators +, -, *, or / with numbers inputted into a specific box? After clicking "try it," an error message is displayed: ORIGINAL AMOUNT: NaN ORIGINAL AMOUNT: NaN ...

Prevent Scrolling While Dragging in Material-UI Grid

I'm currently developing an application that features multiple columns in a MUI Grid, enabling horizontal scrolling. This app serves as a task planner, and I aim to implement drag-and-drop functionality for tasks moving between the visible columns on ...

Add a background color to a drop-down selection box on Mozilla

I am trying to add a background color to a select box. My code successfully adds the background color to the options in Chrome, but not in Mozilla. How can I apply the background color to the select box in Mozilla as well? https://i.sstatic.net/TYU6R.png ...

Deactivate the second subradio button when the first option is selected and vice versa

Need some assistance, hoping for your help. I have 2 choices with subcategories. 1 - Option A ---- variant 1 ---- variant 2 ---- variant 3 2 - Option B ---- variant 4 ---- variant 5 ---- variant 6 Check out my code here Users must choose betwe ...

Enabling and disabling links in a Bootstrap dropdown menu with dynamic functionality on click

One interesting feature of bootstrap is that it allows users to disable links within its dropdown menu component by simply adding a class="disabled" into the corresponding <li> tag. I am looking to create some Javascript code so that when a user sel ...

Struggling with extracting HTML page source with Java

My goal is to extract the HTML page source of a website in order to retrieve an email address. However, when I use a ripper or dumper tool, it only captures up to line 160 of the source code. I can manually access the webpage, right-click, and view the pag ...

Executing Basic Calculations Instantly with Live Data in Qualtrics

I am encountering an issue with displaying the values on a slider in Qualtrics. I need to show the value where the respondent has placed the handle, as well as the complementary value from the other end of the scale. For example, if the user has chosen 55, ...

employing JavaScript code for targeting classes rather than IDs

I am facing an issue with a javascript function called MyFunc() that is currently only working with id="item_for_MyFunc". Within the function, there is a var elem = document.getElementById("item_for_MyFunc"); and the HTML body contains: <body onload= ...

What is the process of running PHP in a .ctp file within the CakePHP framework?

I have recently started working with CakePHP and I have a question about how PHP code is executed in a file with the .ctp extension. Can you explain how PHP is processed within a .ctp file in CakePHP? Additionally, I'm also curious about executing PHP ...

Positioning ImageView on Android platform

I'm looking to align two images horizontally in my activity, with one on the right side of the screen and the other on the left. I want to achieve this using relative positioning rather than setting specific margin values to ensure compatibility with ...

Is there a way to modify the video height so that it aligns with the dimensions of the

I'm currently trying to adjust the background video to fit the parent div, but I am facing issues with adjusting its height within the media query. Any suggestions on how I can resolve this problem? HTML <div class="hero"> <video ...

Displaying hyperlinks within a table that is contained within a div on the current webpage

I have created an HTML page that looks like this: <!DOCTYPE html> <html> <body bgcolor="#EBF5FB"> <h1 align="center">SLA Monitor Reports </h1> <div id="link" align="center"> <table cellpadding="25px" bord ...

Displaying SQL data in a table using PHP

I've encountered a dilemma where the category name is being outputted as the same for both offered and wanted categories in PHP. This issue arises when trying to display categoryName differently for each type of category in a table. Despite attempting ...

How can I achieve transparency for an element while it is nested within multiple parent

Is there a clever method to achieve transparency for an element that allows the background of its parent element to shine through and display the body background, for example? Consider this scenario: <body style="background: url(space.jpg)"> <di ...

Utilize flexbox to create a list that is displayed in a column-reverse layout

I am facing a challenge in displaying the latest chat person in the 1st position (active) using Firebase. Unfortunately, Firebase does not have a date field which makes it difficult to achieve this. I have attempted converting the date into milliseconds an ...