Questions tagged [border-spacing]

a CSS property that specifies the distance between the borders of adjacent cells; equivalent to the cellspacing attribute and additionally allows specifying different horizontal and vertical spacing.

a CSS property that specifies the distance between the borders of adjacent cells; equivalent to the cellspacing attribute and additionally allows specifying different horizontal and vertical spacing.

38 questions
10
votes
1 answer

What is the difference between border-collapse: collapse; and border-spacing: 0;

Is border-collapse:collapse; and border-spacing: 0px; /* only active/useful with option "separate" */ border-collapse:separate; the same?
Jean Fontaine
  • 135
  • 1
  • 1
  • 7
8
votes
4 answers

How to remove spaces between cells in a html table

I try to remove white space between Table1Header and Table2Header. I tried border:0px, padding:0px and border-spacing:0px; styles. Firefox and Opera tell me that my border-spacing style is overrided by the user agent style (which is 2px). How can I…
user3193136
  • 93
  • 1
  • 1
  • 4
6
votes
5 answers

Weird spacing between element and border in chrome

I wrapped a few divs inside a div container, and I can see some weird space between the borders and elements. The problem is occurring on chrome and edge. I tried Mozilla, and it worked fine. I am using bootstrap, with some custom CSS. I am sharing…
Pranav Rustagi
  • 2,604
  • 1
  • 5
  • 18
6
votes
1 answer

Override Bootstrap table border-collapse style

Bootstrap has a table {border-collapse: collapse; border-spacing:0;} style. I want to override this so I've create a class and applied it to the table in question: table.FormGroupContainer { border-collapse: separate; border-spacing:…
5
votes
2 answers

Remove Space Under Canvas Element?

I wrote the following code canvas{ width: 1000pt;height: 100pt; margin: 0px; } .bluecolor{background-color : skyblue;} .orangecolor{ background-color : darkblue;} .indianred{background-color : #CD5C5C ;}
user7359847
3
votes
2 answers

Can't override border-spacing in User Agent style sheet

For some reason I can't override the border-spacing in the User Agent style sheet in Chrome. At the moment it is set to 2px, but I want this to be 0px. The border-collapse gets overridden just fine but the border-spacing does not. I've also tried…
user2896819
  • 65
  • 2
  • 5
2
votes
0 answers

Inconsistent horizontal and vertical DIV spacing

I'm puzzled as to why on some browsers I get regular grid spacing between squares and others I get different spacing vertically than I do horizontally. I'm using Chrome Version 96.0.4664.93 (Official Build) (x86_64). I was told a little hack which…
Chris
  • 33
  • 5
2
votes
1 answer

Full-width table with cell spacing, but no outer spacing

This question is similar to this one, but with an added requirement: I want the table to have 100% width inside its parent. Copied image from that question: So I want the "green part" to take up 100% width of the parent, and with the yellow spacing…
Sygmoral
  • 7,021
  • 2
  • 23
  • 31
1
vote
4 answers

Flexbox - How to create a border around and between differently sized items

I'm trying to make a Flexbox that looks like this: Flexbox layout, where there's a border around the entire Flexbox, as well as between the two items. My issue is that I can either get a border around the entire Flexbox, but not between the items,…
1
vote
2 answers

How to add a dotted line or add padding to td border

The below image is already close to the solution i am looking for (see my codepen). The only thing that is missing is a padding / gap between the outline border of or and the border of the Questions What approach would you…
surfmuggle
  • 5,527
  • 7
  • 48
  • 77
1
vote
0 answers

Cant change webkit border-spacing

I've been working on some sort of a drawing grid recently and used border-spacing. HTML: