Solved

Bootstrap - CSS

Posted on 2016-08-25
1
74 Views
Last Modified: 2016-08-27
Please look at http://rkassoc.org/Houston/.

Note how the tan background extends to the right. Note in the code (HTML), things are centered. I do not want the excess background on the right.

How do I get rid of it?

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">

    <title>City of Houston Backflow Assembly & Test Report Form</title>
    <style>
        .nopadding {
            padding: 0 !important;
            margin: 0 !important;
        }
        
        .wrapper {
            max-width: 767px;
            min-width: 480px;
            margin: 0 auto;
        }
    </style>
	<script>
	function chk_vals() {
		if (document.st.uid.value == "" || document.st.pwd.value == "") {
			alert("Please enter Email & Password");
			return false;
		}
		return true;
	}
	</script>
</head>	
<body>
<div class="wrapper">
<form method="POST" name="st" action="chk_login.php" onSubmit="return chk_vals();">
<div class="container-fluid" style="background-color: #F3D9AF;">
<div class="row" style="background-color: #F3D9AF;">
    <div class="col-xs-8 text-center"><img src="images/bfp_logo_sm.jpg"></div>
</div>
<div class="row" style="background-color: #F3D9AF;">
       <div class="col-xs-8 text-center" style="font-size:18px;"><b>Backflow Assembly & Test Report Form</b></div>
 </div>
 	
	<div class="row" style="background-color: #F3D9AF;">
         <div class="col-xs-8 text-center"><b>User Login</b></div>
    </div>
				<div class="row">
                    <div class="col-xs-8">User ID: (Email)</div>
                </div>
				<div class="row">
                    <div class="col-xs-8"><input type="text" name="uid" style="width:200px;"></div>
                </div>
				<div class="row">
                    <div class="col-xs-8">Password:</div>
                </div>
				<div class="row">
                    <div class="col-xs-8"><input type="password" name="pwd" style="width:200px;"></div>
                </div>
	<div class="row" style="background-color: #F3D9AF;">
        <div class="col-xs-8 text-center" style="padding-top:10px;">
            <input type="submit" value="Login">
        </div>
    </div>
            </div>
        </form>
    </div>
</body>

</html>	

Open in new window

0
Comment
Question by:Richard Korts
1 Comment
 
LVL 55

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41770941
Your content is all inside the following elements
<div class="col-xs-8">

Open in new window

This is restricting your content to the left 75% of the parent container.

You need to make that col-xs-12 to extend to the full width of the parent. If that is too wide then you need to put the parent into a container of its own - something like

<div class="row">
   <div class="col-xs-8 col-xs-offset-2">
         <!-- Login box markup goes here -->
   </div>
</div>

Open in new window


The col-xs-offset class basically pushes the container left the specified number of columns. Because the content area is 8 columns wide - leaves 4 columns which we divide by 2 to get the offset value.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question