Solved

Bootstrap - CSS

Posted on 2016-08-25
1
62 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 52

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now