Solved

Bootstrap - CSS

Posted on 2016-08-25
1
54 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 51

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

757 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

19 Experts available now in Live!

Get 1:1 Help Now