Trouble with Divs and Element Placement

I am struggling to recreate this layout example. I attempted to make it align correctly, but I am having trouble looping the comment box under the review score. Can someone provide an example or guide me on how to achieve this design?

Example image:

https://i.stack.imgur.com/lt0sv.png

This is what I have created so far, using a background color to highlight the div box.

https://i.stack.imgur.com/B5aOI.png

Below is the code snippet:

* {
  box-sizing: border-box;
}

body {
  background-image: url("background.png");
  font-family: Tahoma;
  font-size: 8px;
}

.banner {
  margin-left: auto;
  margin-right: auto;
  background-image: url("bannerbackground.png");
  background-repeat: repeat;
}

H1 {
  font-family: Tahoma;
  font-size: 24px;
  text-align: center;
}

DL {
  width: 100%;
  overflow: hidden;
  background: #ff0;
  padding: 0;
  margin: 0
}

DT {
  float: left;
  width: 50%;
  background: #cc0;
  padding: 0;
  margin: 0
}

DD {
  float: left;
  width: 50%; //background: #dd0
  padding: 0;
  margin: 0
}

.overview {
  display: table;
  margin: 0 auto;
  float: right;
  background-color: red;
}

.everything review {
  border-style: solid;
  border-width: 4px;
  border-color: grey;
}

.review p {
  float: left;
  display: block;
  background-color: blue;
  margin: 0px 10px 0px 0px;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">

  <HEAD>
    <TITLE>TMNT - Rancid Tomatoes</TITLE>
    <META content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
    <LINK rel="stylesheet" type="text/css" href="movie.css">
  </HEAD>

  <BODY>
    <DIV class="banner">
      <IMG alt="Rancid Tomatoes" src="images/banner.png" align="middle">
    </DIV>
    <H1>TMNT (2007)</H1>
    <DIV class="everything" align="center">
      <DIV class="overview">
        <IMG alt="general overview" src="images/generaloverview.png">
        <DL>
          <DT>STARRING</DT>
          <DD>Mako
            <BR> Sarah Michelle Gellar</DD>
          <DT>DIRECTOR</DT>
          <DD>Kevin Munroe</DD>
          <DT>RATING</DT>
          <DD>PG</DD>
          <DT>THEATRICAL RELEASE</DT>
          <DD>Mar 23, 2007</DD>
          <DT>MOVIE SYNOPSIS</DT>
          <DD>After the defeat of their old arch nemesis, The Shredder, the Turtles have grown apart as a family.</DD>
          <DT>MPAA RATING</DT>
          <DD>PG, for animated action violence, some scary cartoon images and mild language
          </DD>
          <DT>RELEASE COMPANY</DT>
          <DD>Warner Bros.</DD>
          <DT>GENRE</DT>
          <DD>Action/Adventure, Comedies, Childrens, Martial Arts, Superheroes, Ninjas, Animated Characters</DD>
          <DT>OFFICIAL MOVIE SITE</DT>
          <DD>
            <A href="http://www.tmnt.com/">The Official TMNT Site</A>
          </DD>
        </DL>
      </DIV>
      <DIV class="review">
        <DIV>
          <IMG alt="Rotten" src="images/rottenbig.png"> 32% (88 reviews total) </DIV>
        <P>
          <IMG alt="Rotten" src="images/rotten.gif">
          <Q>Ditching the cheeky, 
self-aware wink that helped to excuse the concept's inherent corniness, the 
movie attempts to look polished and 'cool,' but the been-there animation can't 
compete with the then-cutting-edge puppetry of the 1990 live-action 
movie.</Q>
        </P>
        <P>
          <IMG alt="Critic" src="images/critic.gif"> Peter Debruge
          <BR> Variety </P>
        <P>
          <IMG alt="Fresh" src="images/fresh.gif">
          <Q>TMNT is a fun, 
action-filled adventure that will satisfy longtime fans and generate a legion of 
new ones.</Q>
        </P>
        <!-- Additional reviewer info here -->
      </DIV>
    </DIV>
    <DIV>
      <A href="http://validator.w3.org/check/referer">
        <IMG alt="Valid XHTML 1.1" src="images/w3c-xhtml.png">
      </A>
      <BR>
      <A href="http://jigsaw.w3.org/css-validator/check/referer">
        <IMG alt="Valid CSS!" src="images/w3c-css.png">
      </A>
    </DIV>
  </BODY>

</HTML>

Answer №1

If you're looking to improve the layout, consider switching from using divs to a table structure. This will allow you to create a cleaner and more organized design. Here's an example:

<table id="theentiretable">
<tr>
  <td class="topleftgreen">information here</td>
  <td class="toprightblack">information here</td>
</tr>
<tr>
  <td class="textandquotes">information here</td>
  <td class="posterimg">information here</td>
</tr>
<tr>
  <td>any other information here</td>
</tr>
</table>

By utilizing a table, you can easily customize the styles of each cell while keeping everything neatly organized in one central location. You can also wrap the entire table with a div for background and effects as needed. Alternatively, you could use two smaller tables to better suit your specific requirements.

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

Achieving the desired results through the utilization of CSS3 rather than relying on images

I am currently exploring the use of CSS3 to create a menu instead of relying on images over at . You can view my progress and code (including images and styles) here: Although I attempted to use CSS3 for the border shadow and matching the background of ...

Ways to adjust iframe height as it loads

$('#song-link').change(function () { var link = $('#song-link').val(); SC.oEmbed(link, { element: document.getElementById('putTheWidgetHere') }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1 ...

Iterate using jQuery through all child div elements

<div id="SelectedSection" class="selected"> <div class="sec_ch" name="7"> <div class="sec_ch" name="8"> <div class="sec_ch" name="9"> <div class="sec_ch" name="11"> <div class="clear"> </div> </di ...

Ensure that the Popover vanishes upon scrolling the page - Material UI (MUI) v5 compatibility with React

When implementing the MUI v5 standard pattern for displaying a popover upon hovering over another element, everything works smoothly except for one scenario: If you hover over the element And without moving the mouse, use the scroll wheel to scroll throug ...

Customizing Row Background Color in Bootstrap

Currently working on a project www.codepen.io/anon/pen/yMmjZb The problem I am facing is with my 3rd row (the one with the 3 columns) where the background color is bleeding beyond the intended boundary. My suspicion is that it's due to the row span ...

The hamburger menu image is not appearing when using the CSS background-image property

The burger menu image I have as a background image is not displaying in my navigation bar or on the page. I set it to appear when the page is responsive (max-width: 480px), but it still doesn't show. I even tried copying the code to my main CSS above ...

Utilize AngularJS to create a custom tag with a directive included

I've been working on creating a custom tag for a reusable component in a web page, but I seem to have hit a roadblock. It's not functioning as expected, and I feel like I might be overlooking something. If anyone could provide some guidance or p ...

The Impreza theme is experiencing difficulty displaying Font Awesome icons

Recently, I had a client who needed a WordPress website. After working on the project on my own server, I finally completed it and transferred the entire site to the client's main domain at gulugalmarketing.com. Everything was functioning perfectly o ...

Using canvas transformation changes the way drawImage is applied

I have been working on a game as a hobby and you can find it at . I have managed to get most aspects of the game working well, such as transformation, selection, movement, and objects. However, there is one particular challenge that I am struggling with. ...

Navigating to a new page by clicking a button

I am trying to redirect to a different web page when a button is clicked. Below is the code snippet I am working with: JavaScript code snippet: app.controller('myCtrl', ['$scope', '$location', function($scope, $location) { ...

What is the best way to ensure an image fills the entire space within a Bootstrap modal container?

I'm having some issues with my bootstrap modals that contain images. When the images are long vertically, a scrollbar appears which is not ideal. I tried to solve this by setting a max-height for the modal-content and making the modal-body (where the ...

Stopping an HTML5 range input at a specific number: Tips and tricks

Does anyone have suggestions on how to use angularjs to stop a range slider at 75? I attempted it but it doesn't seem like the best approach. Any guidance would be appreciated. [EDIT for clarification after max=75 answer] Just to clarify, I want to di ...

Organize the attributes of components on the following line in Visual Studio Code

Is there a method to configure the VS code formatter for Angular 2+ templates to ensure that attributes are wrapped in a new line? I prefer this formatting: <app [input1]="input1$ | async" [input2]="input2$ | async" (inputChanged)="set ...

Enable and disable modal popup functionality in ng-bootstrap for Angular 5

How do I enable (editable) and disable (not editable) an ng-bootstrap modal popup? I have the following HTML code to display a modal popup when a button is clicked. However, I want it to be inactive until a certain condition is met. I am unsure of how to ...

Having trouble with updating your website asynchronously through code? In need of a detailed explanation?

Here are two Javascript functions that are used to call a python file in order to update an HTML page. The first function works perfectly fine, but the second one seems to be malfunctioning without throwing any errors. function button(key) { var xhttp ...

How can you convert an epoch datetime value from a textbox into a human-readable 24-hour date format

I have an initial textbox that displays an epoch datetime stamp. Since this format is not easily readable by humans, I made it hidden and readonly. Now, I want to take the epoch value from the first textbox and convert it into a 24-hour human-readable da ...

Guide to inserting an HTML file into an article's content

After downloading an extension from freefrontedit and uploading it to my server in the directory /accordeon, I successfully accessed it by pointing my browser to . However, I am now faced with the challenge of loading the index.html into my Joomla article ...

Remove all HTML tags except for those containing a specific class

Looking for a regex that removes all HTML tags except the "a" tags with the "classmark" class For example, given this HTML string: <b>this</b> <a href="#">not match</a> <a href="#" target="_blank" ...

Upgrading Bootstrap from version 3.4 to 5.3 in a .NET project

I have a website project created using .Net Framework 4.7.2. Currently, I am utilizing Bootstrap version 3.4.1 from here. Since Bootstrap 3.4 is now in an end-of-life phase, I need to upgrade to the latest version, 5.3. Upon replacing the old version fil ...

jquery is unable to fetch the input value from a dynamically generated field inside a function

Something peculiar keeps happening to me when I utilize jQuery, which is different from what others have encountered in the forums. Whenever I make an ajax call and generate an input element (on success), like so: Start Date: <input type="text" id="gr ...