Skip to main content
Participant
Feb 2, 2017 5:59 PM UTC
Answered

Weird "gutters" in page

Hi everyone! I'm currently working on a site and I've got a visual issue going on here. I'm trying to design it to fit the screen exactly width-wise while being scrollable lengthwise. I'm not very far into the design so things are still in the rough.

The issue I'm having is that the site is scrollable width-wise and has these tiny spaces showing- as if the background image doesn't fill the space... But it should as far as I know because its width is scaled to 100% of <body>, and my menu extends into the negative space. Is there something wrong with my meta-viewport? Is the padding in my menu pushing something?

I need to stop the horizontal scrolling and get rid of the weird gutter space on either side of the background image. Hope my description helps! I pasted code below!

THE HTML

<!doctype html>

<html>

<head>

  <meta charset="utf-8"></meta>

<title>Albion Front Page</title>

<meta name="viewport" content="width=device-width">

<!--Style_Sheet-->

<link href="Albion Front Page Style Sheet.css" rel="stylesheet" type="text/css">

</head>

<body style="position: absolute; width: 100%; background-image: image()">

<img src="images/AboutAlbionImage.jpg" width="100%" alt=""/><!--Header!-->

<header>

<!--Navigation_Menu-->

   

   <nav>

        <ul id="menu">

  <li><a href="#" style="text-decoration: none">

   <p> ORDER</p>

  </a></li>

  <li><a href="#" style="text-decoration: none">

   <p> ABOUT</p>

  </a></li>

  <li><a href="#" style="text-decoration: none">

   <p> NEWS</p>

  </a></li>

  <li><a href="#" style="text-decoration: none">

   <p> PRODUCTS</p>

  </a></li>

  <li><a href="#" style="text-decoration: none">

   <p style="text-decoration: none"> HOME</p>

  </a></li>

</ul>

    </nav>

</header>

<!--Main Content-->

<main>

    

    

    

    

    

     <section class="hero"></section>

     <section class="intro"></section>

</main>

<section class="artworks">

  <article class="artwork">

    <div class="artwork-piece">

           <figure>image</figure>

    </div>

      <div class="artwork-description"></div>

  </article>

</section>

  </main>

<!--End Main Content-->

<!--Footer-->

<footer class="Feet"></footer>

<!--End Footer-->

</body>

</html>

THE CSS:

@charset "utf-8";

/* CSS Document */

html,

html* {box-sizing: border-box;

  margin: 0;

padding: 0;}

body {

font-size: 1vw;

background: black;

  text-decoration: none;

  padding: 0em;

  margin-top: 0em;

}

header {

  position: fixed;

  padding:0em;

  z-index: 1000;

  top: 0;

  left: 0;

  width: 100%;

  text-decoration: none

}

nav {

  z-index: 400;

  top: 0;

  left: 0;

  opacity; .95;

  background: #000000;

  float: right;

  display: inline-block;

  width: 100%;

  text-decoration: none;

  position: fixed

}

menu {

  height: 5%;

  display: inline-block;

  float: right;

  text-decoration: none;

}

li{ text-decoration: none

  display: inline-block;

  float: right;

  padding-right: 1%

}

a href{color: #FFFFFF;}

@11220649-face {

    font-family:Centaur;

    src: url('your_font.ttf');

}

p{color: white; text-decoration: none;}

This topic is closed to new replies. Start a new post to keep the conversation going.
Nancy OShea
Nancy OSheaCorrect answer
Community Expert
Feb 2, 2017 9:18 PM UTC

HTML5 semantic tags are a good structure.

http://www.w3schools.com/html/html5_semantic_elements.asp

http://www.w3schools.com/html/img_sem_elements.gif

Nancy O'Shea— Product User & Community Expert

4 replies

Participant
Feb 2, 2017 9:09 PM UTC

Got it! It was the margin:top in <body>. I replaced "margin-top: 0em;" with "margin: 0em" in an attempt to center it. Everything fell into place nicely. Not sure why "top" had an effect on it horizontally, but it did.

*on structure* I can't upload to the server at the moment. I followed an Adobe tutorial for the structure and plugged in my own images and CSS. I've since deleted a lot of unused code and closed some tags..Any advice on how I should be structuring it would be appreciated though.

Thanks everyone for your continued help!

Translate
Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
Feb 2, 2017 9:18 PM UTC

HTML5 semantic tags are a good structure.

http://www.w3schools.com/html/html5_semantic_elements.asp

http://www.w3schools.com/html/img_sem_elements.gif

Translate
Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
Feb 2, 2017 6:40 PM UTC

Can you upload your work so far to a TEST folder on your remote server and post the URL?

Nancy

Translate
Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
Feb 2, 2017 6:38 PM UTC

With a quick check, I can see you've got some structural errors in your html that should be taken care of, go to: Ready to check - Nu Html Checker to get a listing.

You've also got some structural defects in your css, get a listing of those at: The W3C CSS Validation Service

Once all of your errors are cleaned up, if it's still happening, post back and we can take a closer look.

Translate