Styling definition lists and background containers with CSS

Currently, I am attempting to enclose a series of elements within a box and showcase some text beneath it:

<div class="ft_models">
    <dl>
        <dt>Models:</dt>
        <dd>
            <div>Item 1</div>
            <div>Item 2</div>
            <div>Item 3</div>
        </dd>
    </dl>
</div>

<div>
    Additional content here
</div>

In my current CSS script, it states:

.ft_models
{
    margin: 10px 5px 10px 0;
    padding: 10px;
    background-color: #F8F8F8;
    color: #000;
}

.ft_models dt
{
    display: inline;
    float: left;
    clear: left;
    margin: 0 0.5em 0 0;
}
.ft_models dd
{
    display: inline;
    float: left;
    margin: 0 0.5em 0 0;
}

The issue at hand is twofold. Firstly, the grey box surrounding my list of items does not encompass all the items. Secondly, the subsequent div containing text displays beside the item list rather than below it.

How can I expand the grey box to include all items and make the following div appear below the item list instead of alongside it?

http://jsfiddle.net/96pfX/

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

How to Customize the Drawer Color in Material-UI v5

I'm currently using MUI v5 in my project and I am encountering some challenges while attempting to style a Drawer component with a black background color. As this update is relatively new, I have not been able to find much information on customizing t ...

The Bootstrap DateTimePicker is displaying on the screen in an inaccurate

I'm having an issue with the datetimepicker on my project. The calendar appears incorrectly in Chrome, but looks fine in Edge. Here's a screenshot from Chrome: https://i.stack.imgur.com/Hi0j4.png And here is how it looks in Edge: https://i.stac ...

Django is refusing to display my CSS and JavaScript files - static files

Within my code in settings.py, I define the static URL like so: STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_URL = '/static/' The location of my static files and folders is at /home/myLinuxUsername/myApp/static/interactive-preview-depe ...

Unable to halt animation at the final frame

I'm attempting to implement a character jumping animation that should stop on the last frame, but it's not working as expected. I have tried using animation-fill-mode: forwards; but it didn't produce the desired outcome. Below is the c ...

Angular CLI is not displaying CSS

I am currently using angular cli version 1.4.3, node version 6.11.3, and npm version 5.4.2. My goal is to retrieve records using angular2 and display them on localhost. I expected the output to look like this: https://i.sstatic.net/S8TVI.jpg however, the ...

A simple guide on how to surround every incorrect input index in mapped inputs with red borders

I am incorporating a modal that corresponds each element of the object newCompanies to a specific row: {newCompanies.map((company, index) => { return ( <div> <div className="side- ...

Interactive carousel featuring responsive image zoom effect on hover

Utilizing the flickity carousel, I have crafted an example which can be found at this link to codepen.io. Here is the CSS code that has been implemented: CSS .image-hoover { overflow: hidden; } .image-hoover img { -moz-transform: scale(1.02); -web ...

Adjust the burger menu color based on the background color of the section

Currently, I am working on creating a hamburger menu component with fixed positioning using the 'fixed' property. The menu icon consists of three white lines by default, but I want them to change to black when placed in a white section. I have tr ...

How to activate the horizontal scrollbar in a jqgrid table

How can I enable horizontal scroll in jqgrid when the grouped text is longer than the table width? The table width is set to approximately 50% of the screen, but when the grouping text exceeds 300 characters, adding overflow property results in the text g ...

Numerous SVGs sharing identical IDs

Is it possible to include multiple SVGs on an HTML page and utilize the same IDs in each of them? <div> <svg height="0" width="0"> <clipPath id="svgPath"> ........ </svg> <svg height="0" width="0"> < ...

Utilizing Bootstrap classes alongside custom CSS within Next.JS

Recently, I've been diving into the world of Next.JS and attempting to integrate it with Bootstrap. However, I've encountered a roadblock - the inability to combine Bootstrap classes with my own custom CSS classes within the className attribute. ...

Would you like to learn how to dynamically alter a button's color upon clicking it and revert it back to its original color upon clicking it again?

My Upvote button starts off transparent, but when I click on it, the background color changes to green. What I need is for the button to become transparent again when clicked a second time. I've attempted using the following code snippet: function ...

What is the best way to ensure that text and SVG elements are properly aligned?

I am facing an issue where the text is not aligned with the SVG icons in my project. Here is an example of the code causing the problem: <span class="cardSpan"> <svg style="width:24px;height:24px" viewBox="0 0 24 24"> <path fi ...

My website is currently experiencing issues with all of the CSS references not working. This problem applies to both external and internal CSS files and consistently

I'm encountering 404 errors when trying to load both internal and external files on a website through my browser. My code snippet looks like this: <link rel="stylesheet" type = "text/css" href='anoceanofsky.css'/> Despite clearing m ...

CSS style to choose the row in a bootstrap table with a specific class

This snippet is from a table created using Bootstrap: <div class="table-responsive"> <table class="table table-bordered table-striped"> <tbody> <tr> <td align="cent ...

Creating a two-column image gallery inside a div:

I need to organize a group of thumbnails into two columns with four thumbnails in each column, solely using CSS. The thumbnails are all structured as follows: <a href="..."><img /></a> Is it possible to achieve this layout through CSS r ...

Difficulty with selecting the nth-child element within an Ember application

In my current project using Ember, I am faced with the challenge of targeting nth-child elements with CSS due to the presence of Ember script tags. Is there a consistent method to achieve this in an Ember application? Instead of the conventional approach: ...

Tips for maintaining the navigation tab's consistent appearance

Whenever I click a button on the sidebar and the current tab is the second tab, the navigation bar switches to display the first tab. How can I prevent this switch and keep the second tab displayed when clicking a button on the sidebar? The code for this ...

Questions regarding the navigation bar

I am currently working on designing a navigation bar featuring a dropdown menu. I envision HOME, FIXTURES, RESULTS, LEADERBOARD all appearing on the same line. Specifically, I would like UPCOMING WEEK, MONTHS to be the dropdown children of FIXTURES, and G ...

Chrome is giving me trouble with the Select (dropdown) background image feature

Is it possible to set an image as the background for a select/drop-down menu? I've tried using the following CSS, which works in Firefox and IE but not in Chrome: #main .drop-down-loc { width:506px; height: 30px; border: none; background-color: Tr ...