How can I remove the border around each div?


ganhy99

I'm creating a sketch tool that allows the user to color "cells" after hovering over them.

The problem I'm facing right now is that each cell has a white border around it, which I can't seem to remove. I've tried making border: none; border-style:none; padding: 0px; margin: 0pxbut none seem to work.

Here is my relevant CSS. Github repository

body {
    background-image: url("images/bg.png");
    background-size: cover;
    font-family: 'Orbitron', sans-serif;
}

#container {
    height: 960px;
    width: 960px;
    align-items: center;
    margin: 0 auto;
}

.cell {
    background-color: black;
    height: 60px;
    width: 60px;
    display: inline-block;
    outline: auto;
}

HTML:

<body>
    <h1 class="title glow">RETRO SKETCH</h1>


    <div id="container">

    </div>
    <div class="controls">
        <button class="button glow">Reset</button>
    </div>
    <script src="script.js"></script>
</body>

I am actually using Javascript to add cells.

function createGrid(len) {
    len = len || 16;
    const container = document.querySelector('#container');
    const per_box_len = Math.floor(960 / len);
    for (let i = 0; i < len; i++) {
        for (let j = 0; j < len; j++) {
            const box = document.createElement('div');
            box.classList.add('cell');
            box.style.width = `${per_box_len}px`;
            box.style.height = `${per_box_len}px`;
            container.appendChild(box);
        }
    }
}
Aristidis Caravas

what outline:none;btw delete it will end up with the space under each line

Related


How can I remove the border around the toolbar?

Axl In my app I'm using the toolbar and it seems I want to get rid of the border around it: Then I create it like this: <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:bac

How can I remove the border around the toolbar?

Axl In my app I'm using the toolbar and it seems I want to get rid of the border around it: Then I create it like this: <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:bac

How can I remove the border around the image?

username How can I remove the border around the square? Exterior: my HTML: <input id="black" type="image" src="html5-canvas-drawing-app/images/color-swatch-brown.png" onClick="changeColorBlack()"> my css: #black{ border:none; outline:none; background:none; pa

How can I remove the border around the toolbar?

Axl In my app I'm using the toolbar and it seems I want to get rid of the border around it: Then I create it like this: <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:bac

How can I put a border around each table box?

Zhao I'm having trouble putting table borders around each box in the table, it just shows the table without borders. I want it to show table with border . I've tried using the for table border cssin w3schools and it doesn't seem to work, I also added to it! im

How can I put a border around each table box?

Zhao I'm having trouble putting table borders around each box in the table, it just shows the table without borders. I want it to show table with border . I've tried using the for table border cssin w3schools and it doesn't seem to work, I also added to it! im

How can I put a border around each table box?

Zhao I'm having trouble putting table borders around each box in the table, it just shows the table without borders. I want it to show table with border . I've tried using the for table border cssin w3schools and it doesn't seem to work, I also added to it! im

How can I put a border around each table box?

Zhao I'm having trouble putting table borders around each box in the table, it just shows the table without borders. I want it to show table with border . I've tried using the for table border cssin w3schools and it doesn't seem to work, I also added to it! im

How can I put a border around each table box?

Zhao I'm having trouble putting table borders around each box in the table, it just shows the table without borders. I want it to show table with border . I've tried using the for table border cssin w3schools and it doesn't seem to work, I also added to it! im

How can I remove the light grey border around the Canvas widget?

Rectangle Rectangle: I've been messing around with Tkinter Canvaswidgets to see if I can make some nice looking widgets, and I have a few questions. First of all, why is there a light grey border around my Canvas widget and how do I get rid of it? Second, why

How can I remove the light grey border around the Canvas widget?

Rectangle Rectangle: I've been messing around with Tkinter Canvaswidgets to see if I can make some nice looking widgets, and I have a few questions. First of all, why is there a light grey border around my Canvas widget and how do I get rid of it? Second, why

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How to remove blue border around div

prick Would like to check what is the method I can use to remove the anonymous blue outline <div class="profile"> <a href="" data-toggle="modal" data-target="#myModal" style="border-width:none;"> <img class="img-circle" src="{{asset('images/user-profile

How can I add a border around the canvas?

Thomas I am now wondering how to add a border around the canvas . So just use CSS code border:black 3px solid; You will get the border in the canvas . And I don't want the border on the canvas. I want a border around the canvas . I want to use CSS. thanks for

How can I add a border around the canvas?

Thomas I am now wondering how to add a border around the canvas . So just use CSS code border:black 3px solid; You will get the border in the canvas . And I don't want the border on the canvas. I want a border around the canvas . I want to use CSS. thanks for

How can I add a border around the canvas?

Thomas I am now wondering how to add a border around the canvas . So just use CSS code border:black 3px solid; You will get border in canvas . And I don't want the border on the canvas. I want a border around the canvas . I want to use CSS. thanks for your he

How can I add a border around the canvas?

Thomas I am now wondering how to add a border around the canvas . So just use CSS code border:black 3px solid; You will get border in canvas . And I don't want the border on the canvas. I want a border around the canvas . I want to use CSS. thanks for your he

remove white border around div

Joris I'm trying to create a page that detects if a mobile device is in portrait mode. The function seems to be working fine, but there is a problem with the layout. I always get a white border around my div tags, but can't seem to figure out where it comes fr

remove white border around div

Joris I'm trying to create a page that detects if a mobile device is in portrait mode. The function seems to be working fine, but there is a problem with the layout. I always get a white border around my div tags, but can't seem to figure out where it comes fr

How can I remove the red border from that div when clicked?

Leah George I used font awesome icons in a div. After clicking, I change the color to blue. However, I don't want the red border on click. How to delete? HTML <div class="row tile-container"> <div class="tile-art search" (click)="changeSearchClass()

How can I remove the red border from that div when clicked?

Leah George I used font awesome icons in a div. After clicking, I change the color to blue. However, I don't want the red border on click. How to delete? HTML <div class="row tile-container"> <div class="tile-art search" (click)="changeSearchClass()

How can I remove the red border from that div when clicked?

Leah George I used font awesome icons in a div. After clicking, I change the color to blue. However, I don't want the red border on click. How to delete? HTML <div class="row tile-container"> <div class="tile-art search" (click)="changeSearchClass()

How can I remove the red border from that div when clicked?

Leah George I used font awesome icons in a div. After clicking, I change the color to blue. However, I don't want the red border on click. How to delete? HTML <div class="row tile-container"> <div class="tile-art search" (click)="changeSearchClass()

How can I remove the slight white border of a div?

Mukul Kant Below is part of my code. The question is how to remove the tiny white line on the blue round box in mozilla firefox 50.1.0 .s{ animation: 2s ease-out 0s normal none infinite running r0; background: #639dcf none repeat scroll 0 0; border-radi