Arrange two columns of clickable text links

I am currently working on a code block and I am trying to display two columns, one on the left and one on the right. However, the second column is appearing below the first one.

<style type="text/css"> 
    a img{border:none;}
    #planninglaunchbox
    {
        background:#f3f8e7;
        color:#1f1f1f;
        font:normal 11px Arial,sans-serif;
        margin:0 10px 10px 0;
        overflow:hidden;
        width:235px;
    }
        #planninglaunchbox .inner
        {
            padding:10px 0 10px 10px;
        }
        #planninglaunchbox a{color:#1f1f1f;text-decoration:none;}
        #planninglaunchbox a:active,
        #planninglaunchbox a:hover{text-decoration:underline;color:#579BC3;}
        #planninglaunchbox h3
        {
            color:#1f1f1f;
            font:normal 12px Georgia,serif;
            margin:0 0 5px;
            text-transform:lowercase;
            width:215px;
        }
        #planninglaunchbox h4
        {
            font:bold 12px Arial,sans-serif;
            margin:0 0 10px;
        }
        #planninglaunchbox ul
        {
            list-style:none;
            margin:0 0 5px;
            padding:0;
        }
            #planninglaunchbox ul.first{margin-right:10px;}
            #planninglaunchbox ul.first,
            #planninglaunchbox ul.last

        {
                float:left;
            }

            #planninglaunchbox ul li
            {
                background:none;
                margin-bottom:5px;
                padding:0;
            }
                #planninglaunchbox ul li img
                {
                    margin-right:6px;
                    vertical-align:middle;
                }
        #planninglaunchbox .seeall
        {
            clear:both;
            margin:0;
            padding:0;
            width:auto;
        }
</style>
<div id="planninglaunchbox">
<div class="inner">
<h3> Theme</h3>
<ul class="first">

!--Some links--  

</ul>




<ul class="last">

!--Some links--  


</ul>

</div>
</div>

Answer №1

To create a side-by-side layout, apply the float:left property to the desired elements.

Answer №2

I have a fondness for lists because of their inherent semantic value.

<style>
ul {
    width:200px;
}

ul li {
    width:100px;
    float:left;
}
</style>

<ul>
    <li><a href="">Something</a></li>
    <li><a href="">Something</a></li>
    <li><a href="">Something</a></li>
    <li><a href="">Something</a></li>
</ul>

And here's the same code with some additional spacing:

<style>
    ul {
        width:220px;
    }

    ul li {
        width:100px;
        float:left;
        margin-left:10px
    }
    </syle>

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

What is the best way to exclude an external HTML file from being displayed on the home page?

shopping_cart.php <div id="main-container"> <div class="container"> <span class="top-label"> <span class="label-txt">Shopping Cart</span> </span> <div class="content-area"> <div class="con ...

Move all items in the div to the right/left using Bootstrap

Recently, I've been working on making my webpage responsive. I included Bootstrap and organized my content into two divs side by side within a fluid container. Despite my efforts to use "pull-right" and "float-right" classes on the left buttons, and ...

I aim to toggle the visibility of input fields upon clicking a button

Form.html <form [formGroup]="myForm"> <ion-button [(ngModel)]="isActive"(click)="onClick()" >Add</ion-button> <ion-item> <ion-label position="floating">First Name</ion-label&g ...

What is the best way to ensure the div expands to the width of the screen as it is being

What changes should I make to the CSS in order to adjust the div class="breadcrumbs" when the table width exceeds the screen length and the background does not extend all the way to the end? See the screenshot for reference. I want the dark blue bar to str ...

most effective method to link table header to corresponding table row within this specific data organization

In my current project, I have a table component that relies on two data structures to create an HTML table: one for the table schema (paymentTableMetadata) and one for the table data (paymentTableData). To simplify the process, I have hardcoded these data ...

CSS only accordion divs that are all opened by default with no need for jquery

My current setup involves: jsfiddle.net/wromLbq5 I would like to enable the functionality of having multiple accordion sections open simultaneously upon page load. This means that when one section is opened, the others should not close. Is there a way to ...

Adjust the width of a DIV based on the width of its text content in CSS

Not long ago, I stumbled upon this fantastic example demonstrating how to incorporate material design elements in buttons. These buttons are created using a combination of classes that allow for easy customization with just a simple modification. However, ...

Using Vue and vue-multiselect to create interactive options based on the selected language

I'm currently developing a Vue website with multilingual support. The chosen language is stored in a Vuex store and accessed through the computed property lang, like so: lang(){ return this.$store.state.lang } I use this lang property in v-if cond ...

Tips for incorporating API-provided CSS values into AngularJS expressions for stylish card customization

I am in the process of creating unique Pokemon cards that pull data from an API. My question is, how can I apply specific CSS styling to each card directly from the API, similar to how I have utilized AngularJS to render the information? So far, I have su ...

Collapse dropdown menus upon clicking outside of them

As a newcomer to coding, I'm trying to figure out how to create multiple dropdown menus where each one collapses when you click outside of it. I've been struggling with the code I wrote for weeks now - I want to have 3 dropdown menus but only one ...

It is important for the CSS :active state to transition to an "inactive" state after a certain period of

For mobile, I utilized the :hover and :active pseudo-classes to create a transition effect when tapping on a tab that enlarges the elements for more information. However, I am seeking a way for the activated element to return to its original state after a ...

Why did the bootstrap installation in my project fail?

Previously, everything on my website was functioning correctly. However, upon launching it now, I noticed that the carousel, buttons, and other elements are broken. It seems like there might be an issue with the Bootstrap CDN as the buttons and sliders are ...

Looking for assistance with fixing the echo issue in my PHP temperature converter script. Any help is greatly appreciated

Below is my PHP code for converting temperatures: <html> <head> <title>Temperature Conversion</title> <meta charset="utf-8"> </head> <body> <form name="tempConvert" method=&q ...

Innovative method for inserting HTML content into the user's clipboard across multiple browsers

If Stackoverflow decided to implement a simple "Copy link to this question" feature. Upon clicking this link on What is your best programmer joke?, it would automatically copy the following HTML code to your clipboard: <a href="https://stackoverflow.co ...

Utilizing v-data-iterator in Vuetify to display data fetched from an API in a table

After a long day of searching and experimenting, I've finally arrived here. Initially, I attempted to create a simple table with 2 columns using Row and iterate over the object to populate the left column with its keys. However, I hit a roadblock when ...

The compatibility issues with the textarea and text-indent: placeholder feature on EDGE are causing functionality problems

I'm facing a peculiar problem with placeholders when using the Edge browser. In my current project, I need to implement a textarea with a specific text-indent property. However, on Edge, the placeholder text appears displaced more than expected. To h ...

Having trouble finding the element with the xpath/css locator in Selenium

I am currently developing a tree view folder structure. Here is the code snippet I am working with: Code: package Selenium_Practice; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.o ...

Enable synchronized scrolling and a fixed/sticky header with splitpanes feature

Sandbox.vue <template> <v-container fluid> <Splitpanes class="default-theme" style="height: 400px" > <Pane v-for="i in 2" :key="i" > & ...

The dropdown submenu in IE10 disappears prematurely, making it difficult to hover over the submenu

One of my clients is experiencing an issue with the navigation menu drop-down on their site at . While it works fine on all browsers, there seems to be a problem with hovering over submenus in IE 10 - they disappear too quickly. The client is using the SR ...

Creating a scrollable table with CSS: A step-by-step guide

My table has too many columns causing it to exceed the width of the screen. I would like to make it scrollable horizontally for a neater and more organized appearance. I believe CSS with the overflow hidden property can achieve this, but I am unsure where ...