What is the best way to adjust the size of my <div> to accommodate additional vertical content?

Every time I attempt to include margin-top: 30px to my box_1 and box_2 <div>, the bottom <div> is pushed down and disappears. It seems like my wrapper isn't expanding to accommodate the content.

How can I achieve a 30px space between the top and box_1/2 and bottom?

<html>

<head>
    <title>Circle Motion</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body> 
    <div id="outer-wrapper">
        <div id="wrapper">

            <div id="top">  
            </div>

            <div id="box_1">
            <img src="chrome_400x400.png" />
            </div>

            <div id="box_2">
            <img src="firefox_400x400.png" />
            </div>

            <div id="bottom">
            <p>All Rights Reserved - CSS_maniac 2012 ©</p>
            </div>

        </div>
    </div>
</body>

</html>

CSS

/* My Stylesheet */

html {
    height: 100%
}

body {
    background-color: grey;
}

#outer-wrapper {
    height: 100%;
    width: 1000px;
    margin: 0px auto;
    background-color: #EAFFDB;
    -moz-border-radius: 15px;
    border-radius: 15px;
}

#wrapper {
    height: 100%;
    width: 960px;
    margin: 0px auto;
    background-color: #EAFFDB;
    overflow: hidden;
}

#top {
    width: 900px;
    height: 110px;
    margin-top: 35px;
    margin-left: 30px;
    margin-right: 30px;
    background-color: white;
    -moz-border-radius: 15px;
    border-radius: 15px;
}

#box_1 {
    width: 430px;
    height: 430px;
    background-color: white;
    -moz-border-radius: 15px;
    border-radius: 15px;
    float:left;
    margin-left: 30px;
    text-align: center;
}

#box_2 {
    width: 430px;
    height: 430px;
    background-color: white;
    -moz-border-radius: 15px;
    border-radius: 15px;
    float:right;
    margin-right: 30px;
    text-align: center;
}       

#box_1 img {
    margin: 15px 0px;
}

#box_2 img {
    margin: 15px 0px;
}

#bottom {
    width: 900px;
    margin: 0px auto 0px auto;
    text-align: center;
    background-color: white;
    -moz-border-radius: 15px;
    border-radius: 15px;
    clear:both;
}

/* Classes */

.clear {
    clear: both;
}

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

Tips for aligning a website logo and header vertically with the navbar

I'm having trouble aligning the navbar vertically with my website logo and header. I've tried using display: inline-block; and vertical-align: middle; on the , , and tags within the same div at the top of my website, but it ends up switching fro ...

Setting up an i18n project in AngularJS

I just embarked on my angularjs journey yesterday with little to no prior knowledge about it. My initial goal is to centralize all the labels for my UI in a file (to facilitate swapping them out for i18n). As far as I know, this can be achieved by importi ...

Ways to transfer a variable from a Node.js script to a JavaScript file on the client side

Seeking guidance on how to transfer the "myBlogs" variable from my Node.js file ("server.js") to a frontend JavaScript file ("blogs.js"). I intend to utilize this variable in the JS file to iterate through the array it contains, generating a template for e ...

Angular and WEB API experiencing issues with the update function synchronization

Currently, I'm developing a CRUD example using dotnet core and Angular. In the backend, I have implemented a function in the CarController.cs as shown below: CarController.cs [Route("UpdateCar")] [HttpPut] public IActionResult Put([ ...

Updating the PHP form to include functionality for a reset button and adjusting the logic for

Having some difficulties with my PHP form. I created a simple form that consists of the following logic: if (isset($_POST['submit'])) { } elseif (isset($_POST['confirm'])) { } else { } The form includes a submit button, followed by a ...

Decrease the gap between rows in CSS Grid

I'm struggling to minimize the space between the rows. I've attempted adjusting margins and paddings to 0, but nothing seems to be working effectively. Displaying desktop view on the left and mobile view on the right side. https://i.sstatic.net ...

Why is it that this particular line of code sometimes gives me an "undefined" result before returning an actual value?

Why does the method 'equal' always return with an "undefined" followed by a number? And when I try to parse it, it returns me a NaN. <!DOCTYPE> <html> <head> <script> var fnum = 0; var secondNum; var operation; functi ...

Adjust the background image color with CSS styling

I have a collection of icons that I would like to incorporate into my application. These icons primarily consist of glyphicons with a few others mixed in. I want the HTML structure to mimic that of a glyphicon, specifically: <a href="#"> <spa ...

What is the process for setting the <script src> to include a javascript file located outside the root folder specified in express.static()?

After setting app.use(express.static('public')), and with the folder structure shown below including my starting express from the parent folder of package.json: ├── package.json ├── public │   ├── favicon.ico │   ├─â ...

The resizing issue of Textarea during transitions

Whenever I add the transition property to a textarea, it automatically affects the resizing function of the textarea. Is it possible to disable the transition only when resizing the textarea, but not for the textarea itself? <textarea name="" id="" cla ...

The issue arises when the HTML form fails to retrieve input control values during postback

I’m encountering an issue with a basic HTML page that contains a form and some controls. The HTML page is hosted on a server. Whenever I submit the form with values filled in the input fields, the input values do not appear in the form post data. The re ...

How can I set a dropdown back to the first index in MVC?

Within my MVC project, I have a dropdown list bound in a div using the code snippet below: @{ List<SelectListItem> lsqty = new List<SelectListItem>(); for (int i = 1; i <= 10; i++) { SelectListItem sl = new SelectListIt ...

Is there a way in Material UI to dynamically update the border color of a TextField once the user inputs text?

Is there a way to style the border of a TextField only when it has text input? I am currently using the outlined version of the TextField, which displays placeholder text when empty. <TextField variant="outlined" /> So far, I have managed ...

Use ng-class in a P tag to assess a variety of expressions

Is there a way to apply ng-class to automatically evaluate negative values within a < p > tag? <p <strong>LW$:</strong> {{d.lw_metric}} <strong>LW:</strong> {{d.lw_metric_percentage}} <strong>L4W:</strong> {{ ...

Tips for effectively utilizing the :valid pseudo-class in Material-UI components to dynamically alter the border styling

Currently, I am attempting to adjust the border color of Mui TextFields using createTheme from Mui v5 when the input is valid. The border itself is defined within the ::before and ::after pseudoclasses. For the TextFields, I am utilizing variant="stan ...

I would like to have the div completely fill the page on my website

How can I make a div fill the entire height of my website using Bootstrap? I want to ensure that the div extends all the way down Please provide guidance on how to accomplish this. ...

Filtering and selecting tables in HTML

I am dealing with an HTML table that combines static data and MySQL input. The filtering functionality is working properly, but I am struggling to add the options "yes" and "no" to the selection list. These values are test inputs fetched from MySQL. I need ...

Showcasing Items Within JSON Object in Angular

I am dealing with a JSON database that contains nested Objects: { "characters2": [ { "campaign":"Menagerie Coast", "index": 1, "name": "Mark Whithershmitz", "portrait": "assets/pics/markW.jpg", "affiliation": "Kryn Dynast ...

Implementing an Onclick function in HTML

I have an HTML code and I am looking to add an onclick event for a button named GET DATA. When the button is clicked, I want to send data for userId and categoryId to a PHP file. Can someone help me implement this functionality in my existing code? Here ...

creating a customized grid layout with Bootstrap 5

Is it possible to create a layout similar to the one shown in this image using Bootstrap 5? In addition, I would like to include an image inside every third item. How can I accomplish this with the Bootstrap grid system? ...