Balancing the alignment of these trio of containers

I am seeking a specific layout for this section:

__________________________
|  |                      |
|  ------------------------
|__|______________________|

My desired header layout is shown above. However, when you view the link below, you will notice that the two div's on the right side are not displaying correctly: http://jsfiddle.net/A5YDJ/3/

Any suggestions or solutions?

Answer №1

Don't forget to include float:left in the #left-box styles

#left-box{
 width:200px;
 height:100px;
 background-color:red; 
 float:left;
}

Check out this example here: http://jsfiddle.net/abcd/

Answer №2

Check out the fixed CSS below, the divs were floated incorrectly before:

#left-box{
    width:190px;
    height:90px;
    background-color:blue; 
    float:left;
}

#top-rel-container{
    float:left;
    width:400px;
    height:90px;
}
#head-top-thin{
    height:45px;
    background-color:red;
    width:400px;
}
#head-bottom-thin{
    width:400px;
    height:45px;
    background-color:green;
}

#cont{
    width:100%;
    height:90px;
    margin:0 auto;
}​

Answer №3

Utilize

float:left;

Verify the revised demonstration at this location

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 use of script src with vue.js is causing issues

I am looking to move my Vue code into an external .js file. Since I am new to Vue, I am trying to keep it simple without using webpack. However, I have encountered an issue where Vue does not work when using the script src tag in the html file. For instanc ...

Implementing Vue.js Popover for Individual Dropdown Items: A How-To Guide

I need unique information text to display for each dropdown item when hovered. I am using bootstrap-vue and have a loop set up for the dropdown items. <b-dropdown :text="currentColorType"> <b-dropdown-item v-for="colorType in co ...

The Vue.js component fails to display when included within another component

I am experiencing an issue with a menu item not displaying properly in my Vue.js application. The menu item should display the text "This is a menu item", but for some reason it is not being processed and rendered by Vue. These are the main com ...

Using setTime in JavaScript allows for customizing and adjusting the

I'm having trouble getting this code to display the time. I thought it would work, but it's not showing the time. Can someone please help me figure out what's going wrong? function startTime() { var currentTime = new Date(); ...

How can I include a ?ref query parameter in a URL when linking from external websites?

I've always wondered about how websites are able to include the ?ref parameter in their URLs when they are referred from another website. Do both sites need to incorporate this into their code? How does this function exactly? ...

A guide on sending JavaScript variables to PHP using AJAX

I've been facing an issue while trying to pass the selected month from a select list in HTML using Ajax. Every time I select a month, it doesn't show up as expected. Initially, there's a placeholder "nothing" displayed due to the if-else con ...

Locate the initial anchor tag using PHP

Is there a way to extract and display only the first anchor tag using PHP from the given HTML string? <ul class="side-navigation"> <li><a href="/?id=12">What is RtII?</a></li> <li><a href="/?id=13">RtII in NY</ ...

Is there a way to implement a "report" button for sending messages that doesn't require using email?

I am in need of a button that reads "Report a typo" and alerts me when it is clicked on a specific page. The project I am working on consists of multiple short pages with just a few paragraphs in each HTML template. It would be helpful for me to have a way ...

I found that the Angular checkbox was only allowing me to select one value at a time instead of

Hey there, I am currently working on an angular tickbox where I want to be able to tick multiple values. However, I am facing an issue where only the latest checkbox value is displayed instead of both English and German together. How can I populate data fr ...

Auto-selecting the first item in a CSS menu when the switcher is tapped on mobile devices

Struggling with a responsive CSS menu on my website, . The switcher on mobile seems to automatically click the first item in the menu (Home) as I open it, redirecting me instantly. When setting the link to "#" everything is fine, but then I lose the home l ...

Initiating a click function for hyperlink navigation

Here is the HTML and JavaScript code that I am currently working with: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-3.3.1.min.js"></script> </head> <body> <a href="#f ...

The width of the menubar dynamically adjusts upon mouse hover using CSS

I encountered a problem with my menu and submenu. When I hover over the list elements in the main menu, the width of the menu items changes abruptly which looks confusing. I tried fixing the width, but then there is too much space between the menu items. ...

Upon loading the page, IE11 activates a CSS transition even when a media query that is not applied is present

Encountering a unique situation with IE11 where a panel (DIV) transition is only activated on pageload if a media query matched the highest CSS specificity for the element. The issue does not occur on Chrome, Firefox, or Safari on tablets and phones. The d ...

How can I display an image before selecting a file to upload in Angular 9?

In the Angular project I'm working on, I currently have this code to enable file uploads: <input #file type="file" accept='image/*' (change)="Loadpreview(file.files) " /> Is there a way to modify this code so that ...

Is there a method to ensure equal alignment of the <div class="card"> elements in Bootstrap?

I need help figuring out how to align this card uniformly with the others: https://i.sstatic.net/x2wZ2.png In the image below, you can see that the card for the top reason for downtime doesn't match the other cards. I want them all to be the same he ...

Troubleshooting the Alignment Issue in Angular Material Expansion Panel Header

I have implemented an Angular 14 Material Expansion Panel as shown in the code snippet below... <mat-nav-list> <a mat-list-item role="listitem" class="list-item-setting" id="emailTemplatesId" matTooltipPosition=&quo ...

"Obtaining Google locations within a modal box - a step-by-step

Having trouble with my Google Places search integration in Angular 2. <input type="text" type="text" class="form-control" placeholder="Address" [ngClass]="{active:signupSubmitted && !signUpForm.controls['formatted_address'].valid}" [ ...

The HTML video controls in Safari take precedence over the window.name attribute

When using Safari 8.0.5, the controls attribute for the video element will change the value of window.name to "webkitendfullscreen". This is significant because I rely on using window.name to store client-side data in Safari's private mode, where loca ...

What is the best way to make the Nav bar overlap instead of shifting content to the right?

Is there a way to open the nav bar and have it overlap on the right without pushing content to the right? I tried experimenting with position and z-index, but it didn't work. Thank you! Link <div id="mySidebar" class="sidebar" ...

Why is it that consolidating all my jQuery plugins into one file is ineffective?

Prior to this, I included the following scripts: <script type="text/javascript" src="{{MEDIA_URL}}js/plugins/json2.js"></script> <script type="text/javascript" src="{{MEDIA_URL}}js/plugins/jquery-msdropdown/js/jquery.dd.js"></script&g ...