Cover the entire screen with a solid background color and adjust the text size accordingly

I'm encountering two issues.

  1. Despite my efforts to adjust multiple containers, the background colour #eee simply won't reach the bottom of the screen. I've even tried setting the HTML height to 100%, but to no avail.

  2. Even though I'm referencing the correct class, the glyph icons refuse to reach a size of 100px.

https://i.sstatic.net/5Dc4W.jpg

The full HTML, along with relevant sections from the CSS.

html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
    height: 100%;
}


body {
  margin: 0;
  height: 100%;
  background-color: #eee;
}

.call-to-action {
text-align: center;
  color: #9D343D;
  text-shadow: 1px 1px #fff;
}
.call-to-action p {
margin-bottom: 30px;
font-family: sans-serif;
  color: #000;
}
.glyphicon-large {
font-size: 100px;
  color: #9D343D;
  text-shadow: 1px 1px #fff;
}

#wrapper {
  background: #eee;
}

#body {
  background: #eee;
}

#page-content-wrapper {
  background: #eee;
}

}
<!DOCTYPE html>
<html lang="en">
<link href="https://fonts.googleapis.com/css?family=Kalam" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Indie+Flower" rel="stylesheet">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Swindon Mela Home Page</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/simple-sidebar.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

        <!-- Page Content -->
        <div id="page-content-wrapper">

          <nav class="navbar navbar-default">
            <div class="container-fluid">
              <!-- Brand and toggle get grouped for better mobile display -->
              <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                  <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#"></a>
              </div>

              <!-- Collect the nav links, forms, and other content for toggling -->
              <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                  <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
                  <li><a href="#">Link</a></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Action</a></li>
                      <li><a href="#">Another action</a></li>
                      <li><a href="#">Something else here</a></li>
                      <li role="separator" class="divider"></li>
                      <li><a href="#">Separated link</a></li>
                      <li role="separator" class="divider"></li>
                      <li><a href="#">One more separated link</a></li>
                    </ul>
                  </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                  <li><a href="#">Link</a></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Action</a></li>
                      <li><a href="#">Another action</a></li>
                      <li><a href="#">Something else here</a></li>
                      <li role="separator" class="divider"></li>
                      <li><a href="#">Separated link</a></li>
                    </ul>
                  </li>
                </ul>
              </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
          </nav>

                      <div class="jumbotron container-fluid">
                        <h1>Swindon Mela</h1>
                        <p>Swindon Mela is a one day event to celebrate Indian culture in Swindon.</p>
                        <p>
                          <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
                      </div>

                      <div class="container">
                        <section class="call-to-action">
                      <div class="row">
                      <div class="col-md-4">
                      <span class="glyphicon glyphicon-heart-empty" aria-hidden="true"></span>
                      <h3>Vibrant community</h3>
                      <p>Swindon Mela hosts a vibrant community.</p>
                      </div>
                      <div class="col-md-4">
                      <span class="glyphicon glyphicon-tree-deciduous glpyhicon-large" aria-hidden="true"></span>
                      <h3>Outdoors</h3>
                      <p>Swindon Mela is held outdoors with plenty of community offerings for the whole family.</p>
                      </div>
                      <div class="col-md-4">
                      <span class="glyphicon glyphicon-gbp glpyhicon-large" aria-hidden="true"></span>
                      <h3>Donate</h3>
                      <p>If you would like to become an official sponsor, please get in touch through our donation page!</p>
                      </div>
                      </div>
                      </section>
                      </div>

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

        <div id="filler" class="fill">
          <div class="section">
            <div class="container">
                <!-- This is filler -->
            </div>
          </div>
        </div>

        </div>
        <!-- /#page-content-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.js"></script>

</body>

</html>

Answer №1

Give this a shot:

#wrapper {
  background: #eee;
  min-height:100%;
}

UPDATE:

<html>
    <body>

      <div class='your_container'>

        <div class='your_second_container'>

        </div>

      </div>

    </body>
</html>

If you specify height:100% for html and body, you can then set min-height:100% for the first div (in this case, your_container) and it will fill at least 100% of the body's height. Alternatively, you could set min-height:100% for the body if html has height:100%;

REVISED ICONS:

<span class='glyphicon glyphicon-console my_icon'></span>

CSS:

  .my_icon{
    font-size:100px;
  }

Any luck with that?

PS. There's a typo in your html - 'glpyhicon-large', but you're using '.glyphicon-large' in the CSS ;-)

Answer №2

Try right-clicking on your content and selecting 'inspect element' to see where your background is located.

If you want a background to be applied globally, consider setting it under the 'body' tag.

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

Gathering information in the form of a tuple with Selenium in Python

I'm having issues with gathering data as a tuple using Selenium with Python 3.6. The specific page I am trying to extract data from is located at (). My goal is to collect the "manufacturer (maker)" data from the search menu at the top of the page. h ...

Easy Peasy CSS Placement

Struggling with CSS and in desperate need of assistance. I've provided my code attempts along with pictures showing what I currently have versus the desired outcome. HTML <div class="thumbposter"><img src="http://tipmypicks.com/cssmovie ...

What is the best way to retrieve the information stored in an object?

let items = { 1001: {item: 'Chocolates', price: 10, quantity: 10}, 1002: {item: 'Biscuits', price: 10, quantity: 10}, 1003: {item: 'Bread', price: 20, quantity: 5}, 1004: {item: 'Milk', price: 25, quantity: 5}, 1005: ...

A unique flex layout with scrolling capabilities specifically designed for optimal performance in Chrome

This layout includes a header, footer, sidebar, and a scrolling main content section. You can view a demonstration of this design on Bootply. <div class="parent"> <div>HEADER</div> <div class="main"> <div class="side"> ...

unable to get highcharts to redraw and reflow properly

I am currently working on creating a dynamic page that can display between 1-4 graphs. These graphs need to be able to resize when added or removed from the page. However, I have encountered a major issue with resizing the graphs after resizing the contain ...

`problem with moment.js incorrectly identifying the day of a given date`

I'm currently working with a field that has the value 03-01-2020, which is in the DD-MM-YYYY date format. However, when I apply the code moment.utc(document.getElementById('date').value, "DD-MM-YYYY HH:mm:ss").toDate(), I noticed that the re ...

Creating an Angular form that adapts to changing input values

I'm encountering a problem with angular not recognizing the dynamic values from my inputs. My objective is to have angular populate hidden form fields with lat/lon when a user clicks on the map. The user then submits the form, but the data ends up mi ...

Incorporating a recurring image beneath a navigation menu

I'm attempting to recreate a header that has a similar appearance to the following: https://i.stack.imgur.com/uVXs3.png However, I am facing challenges in generating the repeating diamond design beneath the black bar. The diamond pattern resembles t ...

JavaScript: Retrieving the names of children within a <div> element

Within my structure setup, there is a tower div with inner elements like this: <div class="tower"> <div class="E0">abc</div> <div class="GU">123</di </div> The challenge I am facing is that I need to access the in ...

developing a multimedia player using HTML5

I'm attempting to create a dynamic video "collage" that showcases videos with different aspect ratios in a flexible grid layout. Each row should have videos of the same height, while filling up the horizontal space within a container. With known widt ...

Creating a button in HTML that deletes code from a program: a step-by-step guide

Let me illustrate what I'm endeavoring to achieve. Below is the actual code: var info = { labels: ["March", "April"], datasets: [ { label: "Primary Info", fillColor: "rgba(220,220,220,0.2)", strokeColor: "rgba(220,220,220 ...

The input fields within a "form" are not functioning correctly with Jquery

Encountering an issue with my project involving a timetable that allows for dynamically adding rows with Jquery. The following are the codes: <?php session_start(); ?> <html lang="es"> <head> <meta charset="iso-8859-1"> ...

Is there a way I can add opacity to a div without impacting the other elements contained in it?

When I set the opacity of a div, it seems to affect all the other elements inside that div by making them transparent too. However, I am looking for a solution where the child elements do not inherit the opacity of their parent. Any assistance on this is ...

Incorporating mootools scripts into a gwt application

My issue involves creating an animation on a Composite that should start when data is loading. To test this, I created animations on regular divs using HTML: <div class="LoadDataWidget"> <div id="arrow" class="greenArrow"></div> < ...

Increase the size of the image while ensuring the content on the right remains proportionate

I have a challenge with managing two different sizes of images (vertical and horizontal) that need to remain the same size. I am attempting to create a container that can hold the image without affecting the surrounding content, while also possibly using o ...

What could be causing my website to lose its responsiveness after linking a domain?

Recently, I created a basic website for an event in my town using AWS Amplify from Amazon. Initially, the website was hosted without a custom domain and had a random URL. It worked well on both web and mobile platforms. However, after connecting a custom d ...

Dynamic JavaScript tool

Does anyone know which library is being used on the website linked here? I am working on a project similar to this and would appreciate if anyone can identify this library for me. Thank you in advance. ...

Concealing a Specific Element with Text using jQuery

Is there a way to conceal the section that includes the element labeled as "Product Tags" on a webpage? ...

"Integrating backgrounds into divs disrupts the overall design aesthetic

One of the challenges I faced was trying to space out the three columns in my Bootstrap row while also splitting each column into two parts. After doing some research, here's the solution I came up with: <div class="container row h-100 mx-auto ...

"Create a Single-Page Bootstrap Website with a Responsive Design showcasing PHP Code within the Contact Form

Working on the final touches of a single-page responsive website project for a client. Utilizing a Bootstrap contact form located at the bottom of the HTML document. The PHP code is unexpectedly displaying in the text fields of the contact form. I've ...