white space in the left of the website

kuyy

this is the html:

html{
    min-height: 100%;
}
body{
    min-height: 100%; 
}
.header {
    background: url("bghero.png") no-repeat;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    font-family: Montserrat;
    height: 200%;
    width: 100%;
    font-size: 70%;
}
#circle{
    text-align: center;
    position: absolute;
    left: 2%;
    top: 4%;
}
#big{
    text-align: center;
    position: absolute;
    font-family: Times New Roman;
    font-size: 700%;
    top: 40%;
    color: white;
    right: 0%;
    width: 100%;

}
#sml{

}
#ham{
    text-align: center-right;
    position: absolute;
    top: 6%;
    right:5%;
}
#src{
    text-align: center-right;
    position: absolute;
    top: 5.8%;
    right:11%;
}
#menu1{
    text-align: center;
    color: white;
    right: 6%;
        position: absolute;
    top: 5.3%;
    width: 100%;
    margin: 0%;
}
#menu2{
    text-align: center;
    color: white;
    right: 0%;
    top: 5.3%;
    width: 100%;
    margin: 0%;
        position: absolute;
}
#menu3{
    text-align: center;
    color: white;
    position: absolute;
    right: -6%;
    top: 5.3%;
    width: 100%;
    margin: 0%;
}

#lowerfoto{
    height: 40%;
    width: 100%;
=}
#fteweit{
    height: 40%;
    width: 100%;
}
#fterblk{
    height: 10%;
    width: 100%;
}
<div class="header">
    <div class="background">
        <img id="circle" src="circle.png" />
        <div class="menu">
        <a href="#">
        <p id="menu1">Home</p>
        </a>
        <a href="#">
        <p id="menu2">About</p>
        </a>
        <a href="#">
        <p id="menu3">Contact</p>
        </a>
        </div>
        <a href="http://www.google.com"><img id="src" src="src.png" /></a>
        <img id="ham" src="ham.png" />

        <div class="welcome">
            <p id="big">Web Design</p>
            <p id="sml">
                Fusce dapibus, tellus ac cursus commodo, tortor mauris <br />
                condimentum , ut fermentum massa justo sit amet <br />
                erat a ante venenatis dapibus posuere velit <br />
            </p>
        </div>
    </div>
    </div>
    <img id="lowerfoto" src="lower.png">    
    <div class="footer">
        <img id="fteweit" src="fterwit.png">
        <img id="fterblk" src="fterblk.png">
    </div>

and I have a white space in the right side of the website, and I can't get it off. What I did figured out, that the menu is making that space and when I remove the menu, there is no space. But I do need that menu, so what do I need to do in order that there will be no white space WHILE there is a menu?

how it looks like: http://prntscr.com/ak745y

The Codesee

The extra space on the left-hand and right-hand side of the website is being caused by the default margin.

To prevent this:

html, body {
  margin: 0; 
}

Update: Your ID #menu3 is causing the issue. My suggestion would be to put the elements inside ul like this:

<ul class="menu">
        <li id="menu" style="margin-left: 40%;"><a href="#">Home</a></li>
        <li id="menu" style="margin-left: 49%;"><a href="#">About</a></li>
        <li id="menu" style="margin-left: 58%;"><a href="#">Contact</a></li>
</ul>

    .menu li {
      display: inline-block;
      color: #fff;
      text-align: center;
      position: absolute;
      top: 5.3%;
    }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

White space to the left of the image

Unwanted white space on the top and left

White space at the bottom of my website

White space appearing on side of website

Compare strings that have white space on the left side

CSS - White space around top and left of page

Unwanted white space on left of UIScrollView on iPhone X

Android - White space on the right and the left of a LinearLayout

javascript - adding white space to left of string

White space on the left of vertical nav bar

How to remove white space in my website

Unwanted White Space at the bottom of my website

How to remove white space at the end of wordpress website?

CSS - Trying to remove white space on website

White Space Right Side of Bootstrap Website

Big white space on right side of website

How to remove white space on the side of my website

HTML/CSS float left automatically fill white space

Bootstrap - How to ensure white space on far left and far right on mobile

Android bottom navigation view has WHITE SPACE on the left and right

Margin left on form creates an extra white space on right side

Shifting middle div to left leaves white space on its right

White space next to div despite margin-left set to 0

Can't remove white space (left and right sides) from Navbar

CSS Apply white space left and right of the table content

Hero Image has white space left and right? First time coding

Why does mobile site scroll left to lots of white space?

HTML tag stuck to top left of mobile page with white space around it

how to modify selection from left to right white space