0

My problem is that when i view this page in my laptop, there is a horizontal scrollbar appearing at the bottom of the page. I have tried man things but cant make that disappear. There is an other problem that when i view this page in my laptop, it appears to be too small, but when i inspect it in chrome, it appears okay.

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style type="text/css">
  header {
    background-color: #EE6E73;
    width: 100%;
  }

  header h1 {
    margin: 0;
    font-size: 45px;
  }

  body {
    background-color: white;
    min-height: 100%;
  }

  footer {
    background-color: #EF9A9A;
    position: fixed;
    width: 100%;
    bottom: 0;
  }

  footer h2 {
    margin: 0;
  }

  header h1 {
    text-align: center;
  }

</style>
<title>My Resume</title>
</head>

<body>
<div class="row">
  <div class="col-sm-12 col-md-12 col-lg-12">
    <header>
      <h1>My Resume</h1></header>
  </div>
  <div class="col-sm-12 col-md-8 col-lg-8">
    <p style="font-size: 1.5625em">My name is John Doe. I have completed my abc from xyz and pursuing def from pqr. I am interested in making applications for the web and mobile, especially android os.</p>
  </div>


  <div class="col-sm-12 col-md-4 col-lg-4">
    <p style="font-size: 1.5625em">My hobbies are:
      <ol style="font-size: 1.5625em">
        <li>Playing basketball</li>
        <li>reading</li>
        <li>traveling</li>
      </ol>
  </div>
  <div class="col-sm-12 col-md-12 col-lg-12">
    <footer>
      <h2 align="center">Contact Me</h2>
      <br>
      <p align="center">John Doe</p>
      <p align="center">City</p>
    </footer>
  </div>
</body>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" 
integrity="sha384-
BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" 
crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-
theme.min.css" integrity="sha384-
rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" 
crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script 
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" 
integrity="sha384-
Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" 
crossorigin="anonymous"></script>

</html>

Here is a jsfiddle link: https://jsfiddle.net/zvdm6de4/1/

3 Answers3

2

TRY THIS CODE

add container-fluid div on wrap of the row

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <style type="text/css">
      header {
        background-color: #EE6E73;
        width: 100%;
      }
      
      header h1 {
        margin: 0;
        font-size: 45px;
      }
      
      body {
        background-color: white;
        min-height: 100%;
      }
      
      footer {
        background-color: #EF9A9A;
        position: fixed;
        width: 100%;
        bottom: 0;
      }
      
      footer h2 {
        margin: 0;
      }
      
      header h1 {
        text-align: center;
      }

    </style>
    <title>My Resume</title>
  </head>

  <body>
  <div class="container-fluid">
  
 
    <div class="row">
      <div class="col-sm-12 col-md-12 col-lg-12">
        <header>
          <h1>My Resume</h1></header>
      </div>
      <div class="col-sm-12 col-md-8 col-lg-8">
        <p style="font-size: 1.5625em">My name is John Doe. I have completed my abc from xyz and pursuing def from pqr. I am interested in making applications for the web and mobile, especially android os.</p>
      </div>


      <div class="col-sm-12 col-md-4 col-lg-4">
        <p style="font-size: 1.5625em">My hobbies are:
          <ol style="font-size: 1.5625em">
            <li>Playing basketball</li>
            <li>reading</li>
            <li>traveling</li>
          </ol>
      </div>
      <div class="col-sm-12 col-md-12 col-lg-12">
        <footer>
          <h2 align="center">Contact Me</h2>
          <br>
          <p align="center">John Doe</p>
          <p align="center">City</p>
        </footer>
      </div>
       </div>
  </body>
  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <!-- Optional theme -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

  <!-- Latest compiled and minified JavaScript -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

</html>
Alfin Paul
  • 1,543
  • 14
  • 26
0

add a div with container-fluid class after body, and keep all your code between this div.

chigs
  • 178
  • 2
  • 12
-1

change body CSS to this

body {
    background-color: white;
    min-height: 100%;
    overflow-x: hidden;
}

You can use overflow-x:hidden or overflow-x:scroll (for horizontal scrollbar) as per you need in CSS file

generally overflow-x is for horizontal scrollBar & overflow-y is for vertical scrollBar

Dexter
  • 7,911
  • 4
  • 41
  • 40