Skip to main content
Participating Frequently
March 29, 2017
Answered

Removing unwanted lines and an unwanted box

  • March 29, 2017
  • 1 reply
  • 404 views

I'm just returning from 2 months away, and the website I started has altered during this time.

1. There is a box at the top of the page that wasn't there when I left, and I can't find the code that has put it there.(this is the unwanted square) Here's the coding where the unwanted box is located.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>groomers</title>
<link rel="stylesheet" href="../style_groomer.css">
</head>

<body>
<header> <a href="../index.html"><img class="style-logo syle-logo-full" src="../Images/car_logo.jpg" alt="Groomer logo"></a>
  <nav class="style-nav">
    <ul>
      <li><a href="../index.html"> Home</a></li>
      <li><a href="#"> About Us</a></li>
      <li><a href="#"> Contact Us</a></li>
      <li><a href="(site address removed by mod. Not relevant to question)"> Conterra Industries</a></li>
    </ul>
  </nav>

@charset "utf-8";
/* CSS Document */

html,
html * {
background-color: #010101;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
margin-top: 2px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 2px;
box-sizing:border-box;
font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, "serif";
}

2. The last day I worked on the site (Monday) everything worked great, today, there are spaces between lines that 'just appeared' I have no idea how. I've even re-typed the code to make sure. This is the coding that has unwanted spaces.

<div class="row">

    <div class="col">

      <div class="price">

        <h3>Price:</h3>

        <h3> 52" - $1,199</h3>

        <h3> 64" - $1,399 </h3>

      </div>

   </div>

  </div>

  <div class="row">

    <div class="col">

      <div class="title-box">

        <h3>FEATURES:</h3>

      </div>

Style Sheet:

.row: before, .row: after;{
content: " ";
display: table;
}

.row: after {
clear: both;
}

.col {

width: 100%;

align-content: center;

display: block;

}

Thank you for all ideas on how to fix this, I tried to post pictures, but don't know how. If anything else is required, please let me know.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    Do you realize your CSS is adding 8 px of padding & 8px of margins around EVERY SINGLE element on your page?    That's what the * (asterisk) does because it's a wildcard selector for everything in your HTML.  If you fix that, your problem may be solved. 

    Nancy

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    March 29, 2017

    Are you saying you have unwanted lines in code format which nobody sees except you or in the actual web page?

    Apply Source Formatting from the Common toolbar might fix the code formatting.

    Nancy O'Shea— Product User & Community Expert
    Aurea2017Author
    Participating Frequently
    March 29, 2017

    Thank you , and sorry - I wasn't very clear. The spaces show up when I view the page in a browser. I don't have a clue where this came from.

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    March 29, 2017

    Do you realize your CSS is adding 8 px of padding & 8px of margins around EVERY SINGLE element on your page?    That's what the * (asterisk) does because it's a wildcard selector for everything in your HTML.  If you fix that, your problem may be solved. 

    Nancy

    Nancy O'Shea— Product User & Community Expert