CSS: Implementing Lists on Multiple Divisions

I need help with organizing an unordered list in two separate divs.

HTML

<div class="wee">
<ul>
<li>Apples</li>
<li>Ball</li>
<li>Apples</li>
</ul>
</div>

<div class="wee">
<ul>
<li>Apples</li>
<li>Ball</li>
</ul>
</div>

CSS

.wee{
    height:100px;
    width:100px;
    position:relative;
    background-color:rgba(176,137,138,1.00);
    display:inline-block;
}

I'm having trouble aligning the lists properly.

Link to my code on fiddle

I can't seem to figure out what's causing the alignment issue.

Answer №1

To ensure the content in .wee is aligned at the top, add vertical-align:top;:

.wee {
    height:100px;
    width:100px;
    position:relative;
    background-color:rgba(176,137,138,1.00);
    display:inline-block;
    vertical-align:top;
}

Check out the jsFiddle demo here.

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

The concept of setting a value is not defined in JavaScript when compared to

Within my primary python script, the following code snippet is present. @app.route('/accounts/test/learn/medium') def medium(): word = random.choice(os.listdir("characters/")) return render_template('accounts/test/medium.html', word=w ...

PrimeFaces Issue with Redirection

Hello everyone, I am currently dealing with a redirection issue. Basically, I have an API that gets triggered when a user clicks on an image. This API captures the user's contact number and initiates a call through the software. Everything is functi ...

Having trouble loading static assets in next.js framework

I am currently using Next.JS to develop a small landing page that features videos and images. To house these static assets, I decided to create a static folder and call the videos/images from there. However, I have encountered an issue where Next is unabl ...

A guide to revealing the value of a button or anchor tag using AngularJS

I'm working on a way to show a button or anchor tag value depending on the true or false value returned by my angular variable. Here's a snippet of my code: <a href="#" id="verify">{{userInformation.value}}</a> The userInformation.v ...

Simple filling out of a dropdown menu form

Currently attempting to populate a drop-down select menu from a table named "Cars" using the information in the "VIN" column. However, for some reason I am not seeing any data displayed. <form> <label>VIN:</label> <select name ...

The submission of the Jquery form is not successful

I am struggling with a form on my page. I want to disable the submit button and display a custom message when submitted, then use jQuery to actually submit the form. <form> <input type="text" name="run"/> <input type=&quo ...

What effect does jQuery animation have on content compression?

Looking for guidance as I dive into jQuery and navigate the complexities... HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" type="text/css" hre ...

Can you explain the distinction between locating an element by its class name versus locating it by its CSS selector?

Class name: var x = document.getElementsByClassName("intro"); CSS selector: var x = document.querySelectorAll("p.intro"); I'm a bit puzzled, are there any distinctions between the two methods or are they essentially the same? ...

Setting up Angular Toolkit via npm installation

After successfully installing the UIKit npm package within an Angular 2 CLI project, what steps should I take to utilize it? I have also installed typings for UIKit (@types/uikit), but I am unsure of how to properly import the package into a controller i ...

Creating a larger spinning div using CSS3 animation

I am looking to add a fun hover effect to my div where it spins and zooms in at the same time. Here is what I have so far: [html] div class="myMsg">> <p id="welly" style="color: #009">Welcome to Y3!<br><br><br>T ...

Progressing through the Material UI LinearProgress bar in steps

How can I split a progress bar into more steps to achieve a design like this? https://i.stack.imgur.com/lRMj6.png I attempted using this code but couldn't find an option for splitting: <LinearProgress variant="determinate" classes={{ ...

CSS-Only Menu Fails to Function with Image Overlayed on Top

I need help with a website I created where I want the header to be placed slightly on top of my CSS menu. However, when I overlay an image, I lose my CSS menu and I am looking for a way to keep it while still displaying the image. My goal is to have the C ...

Simple method to toggle visibility of forms using an AngularJS Button

I am hoping to create a seamless user experience by having a Login/Register button that, when clicked, reveals the corresponding form without validating anything in the JavaScript code. The goal is to have the form slide out when the button is clicked, and ...

The canvas element's drawImage() method fails to render the specified video thumbnail

I'm having trouble creating a function that displays a specific image from a video at a certain time frame. The function takes two inputs: the path to the video and the specific second where the image should be displayed. <!DOCTYPE html> <htm ...

Mobile navigation menu options on the left and right sides

I've encountered an issue with my mobile navigation. I have two navigation menus - one on the left and one on the right, designed to slide out when triggered. The left menu functions correctly with a smooth transition, but the right menu abruptly pops ...

Is there a way to create a hyperlink that automatically opens in a new page with just HTML?

Although this may be a simple request, I would greatly appreciate your assistance with my computer science project. Thank you in advance! ...

Tips on switching the direction of the ripple effect on this button code from left to right

Link to button Code Hi there, I'm not very familiar with CSS. Can someone help me create a ripple effect on this button that starts from the right side and moves towards the left? Basically, I want to change the direction of the ripple effect. .butto ...

The range slider's color value is not resetting correctly when using the <input>

Before repositioning, the slider is at this location: (both thumb and color are correctly positioned) https://i.stack.imgur.com/J3EGX.png Prior to Reset: Html <input id="xyzslider" class="mdl-slider mdl-js-slider" type="range" min="0.0" max="1.0" va ...

Tips on adjusting the size of an HTML canvas specifically for the display

Currently, I am working on an innovative project utilizing HTML5 and canvas: The challenge at hand is to draw on a canvas with dimensions of 2200px/1600px (width/height), display it on my website in a smaller window sized at 600px/400px. However, post cli ...

Methods for updating an HTML-select without a page reload in PHP

I am in need of a solution to update a dropdown list without refreshing the page. The scenario is that I have a form where I can add elements, and another form with a dropdown list connected to a database. If the element I want is not available in the drop ...