Floating CSS containers

Apologies for not including a picture. You can view the design I am trying to achieve here.

I am attempting to create two boxes with a third box below them, and another box on the right side of the layout. All enclosed within a larger container. Everything is working well except for the last box (under3) that I can't seem to get to float to the right. Can someone with more expertise explain what I might be missing? Thank you!

Sincerely, Regin

Here is my HTML code snippet:

<div id="boks1a">
    <div class="mini1">test1
   </div>
    <div class="mini2">test2    
   </div>
    <div class="under1">Testing
   </div> 
</div>
    <div class="under3">test3
   </div>
</div>
</body>

And this is my CSS code:

#boks1a_ydre {
border: 10px red solid;
width: 90%;
}
#boks1a {
border: 4px blue solid;
width: 80%;
}

#boks1a .mini1 {
width: 50%;
height: 200px;
float: left;
outline: 1px red solid;
}
#boks1a .mini2 {
width: 50%;
height: 200px;
float: left;
outline: 1px green solid;
}
#boks1a .under1 {
clear: both;
margin-top: 5px;
width: 100%;
outline: 1px blue solid;
}
#boks1a .under3 {
float:right;
margin-top: 5px;
width: 100%;
outline: 1px blue solid;
}
#boks1a_ydre .mini3 {

width: 100px;
height: 200px;
float: right;
outline: 10px black solid;
}

Answer №1

Check out the images above for reference. Once fixed, make sure to view the demonstration at jsfiddle.net/XbsXz/

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

I am struggling to understand why clicking this button is not successfully submitting the form to Google Sheets

I am facing an issue with my Google Sheet setup that collects form data from my website. The problem is, I am unable to link the event to a button that already exists ('CompleteOrder'). Strangely, it works perfectly fine if I add a new button: & ...

The process of deleting lines from an image using Javascript

If I have an image of a data-table and I want to eliminate all the grid lines (defined as continuous vertical or horizontal pixels), is there a way to achieve this using Javascript's image data manipulation? I envision looping through a 2D array conta ...

Display or conceal numerous WTForm labels

Is there a more efficient way to hide/show multiple wtform labels? Currently, I am achieving this with the following code: HTML: {{ render_field(var_1, class = "class_1") }} {{ render_field(var_2, class = "class_1") }} {{ render_field(var_3, class = " ...

Difficulty arises when collapsed text in Bootstrap clashes with the footer design

Hey there! I'm working on this website using Bootstrap, and I've encountered a problem. When you click the "See Wikipedia" button, the content expands and overlaps the footer in a strange way without changing the page height. I've tried adju ...

What is the best way to smoothly transition in an image that is dynamically set using Angular?

I am using Angular to set a background image for my page, but the current loading behavior is not visually appealing as the image loads from top to bottom. I would like to implement a fade-in effect or load the image from a blurry view to enhance the user ...

What is the best way to create a repeating Jquery loop in code?

Hey there! I've been working on creating a button that toggles the background color from white to yellow and back again using Jquery. However, I've hit a bit of a roadblock with implementing a loop function. If you'd like to take a look at m ...

I'm not sure if I'm doing this right, the image seems to be overlapping the border

Just dipping my toes into the world of HTML/CSS, so feel free to point out any major errors in my code. The issue I'm facing is illustrated in this image (Apologies for the black boxes covering up some content; focus is on the top image). Check out ...

The fade in and fade out effects using JQuery are not functioning as expected despite adding a delay

I am attempting to achieve a text effect where the text fades in, stays visible for a moment, and then fades out. While I understand this can be done with CSS Keyframes, I am unsure of how to implement it with multiple animations. As a result, I am experi ...

Connecting queries in php

I am looking to connect searches from a checkbox form together. For example, if I select checkboxes a and b, I want the search results to display two different outcomes. <form role="form" action="R.php" method="post"> <div class="form-group"&g ...

One helpful tip for adjusting the size of a UI chip on the fly

I am attempting to adjust the size of a UI chip dynamically based on the font size of its parent elements using the em unit in CSS. My objective is to achieve something like this: style={{size:'1em'}} The issue I'm encountering: The chip e ...

Adding a MySQL-PHP combination programmatically

Currently, I am working on a custom HTML page that sends data to PHP variables which are then utilized to generate customized SQL queries. function load_table($db, $old_table, $startRow, $nameColumn, $ipColumn, $addressColumn, $cityColumn, $stateColumn, $ ...

Error in Node: JSON parse failure due to invalid token "'<'" and ""<!DOCTYPE ""

Every time I attempt to run node commands or create a new Angular project, I encounter the following error. Node version 20.11.0 NPM version 10.2.4 ...

Achieving text alignment with icons in Angular

I'm having trouble aligning my text with the icon next to it despite trying to adjust margins. I would really appreciate any help or suggestions on how to resolve this issue. <div class="notification" [ngClass]="{'no ...

Tips for arranging Radio buttons in multiple columns within the same Radio group in Material UI

As a newcomer in the world of React.js, I am feeling a bit anxious about posting my question on Stack Overflow. I hope everyone can overlook my lack of experience and forgive me for any mistakes. I have been struggling to find the right solution to my prob ...

angular - apply custom background styles without resorting to disabling ViewEncapsulation

I can't seem to figure out why I'm struggling to set the background of my component correctly without having to use ViewEncapsulation.None. Currently, with ViewEncapsulation.None, my styles look like this: * { margin: 0; padding: 0; ...

What is the process for encoding images in HTML code?

Is there a method to embed a background image directly in the HTML code? For instance: background-image: url(data:image/gif;base64,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX); If I have an image file, can I encode its data and t ...

Using regex for 'OR' conditions in regular expressions

I have been grappling with this issue for quite some time now. Can you offer any helpful hints or suggestions? When it comes to Outlook emails, we often see forwarded emails containing information within the email body like so: From: Jackson, Peter Sent: ...

Switching Over to Burger Menu

I created a burger menu using HTML, CSS, and jQuery that switches from a full-width menu to a burger menu. However, I'm facing an issue with toggling the dropdown when the menu collapses. Here's my code: <!DOCTYPE html> <html> < ...

Guide to creating the onclick feature for a dynamic button in Meteor

<template name="actionTemplate"> {{#each action}} <button class="myButton" id={{_id}}>btn</button> {{> action}} {{/each}} </template> <template name="action"> <div class="sct" id={{_id}}> ...

What is the reason behind the change in style hierarchy when using ':last-child'?

I found myself in a confusing situation where using :last-child is affecting how parent classes are being applied. The task at hand is to style the last element in a list of elements. However, upon using :last-child, the priority of styles shifts and one ...