Circular HTML table
up vote
1
down vote
favorite
I was wondering if it is possible to make a circular html table ?
In other words, I'd like to put td elements in circle. The closest example I found is this: But this is not an html table. it is a list. I tried this code but I couldn't make it work the way it should be.
I have a table like this:
<table class='ctb'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
html css
|
show 2 more comments
up vote
1
down vote
favorite
I was wondering if it is possible to make a circular html table ?
In other words, I'd like to put td elements in circle. The closest example I found is this: But this is not an html table. it is a list. I tried this code but I couldn't make it work the way it should be.
I have a table like this:
<table class='ctb'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
html css
so why do not use what you found... conver it toli
– לבני מלכה
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
what didn't work?
– DasSaffe
Nov 8 at 9:21
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
why do you have to use a table?
– pasine
Nov 8 at 9:30
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I was wondering if it is possible to make a circular html table ?
In other words, I'd like to put td elements in circle. The closest example I found is this: But this is not an html table. it is a list. I tried this code but I couldn't make it work the way it should be.
I have a table like this:
<table class='ctb'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
html css
I was wondering if it is possible to make a circular html table ?
In other words, I'd like to put td elements in circle. The closest example I found is this: But this is not an html table. it is a list. I tried this code but I couldn't make it work the way it should be.
I have a table like this:
<table class='ctb'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
html css
html css
edited Nov 8 at 9:18
asked Nov 8 at 9:15
Jason
917
917
so why do not use what you found... conver it toli
– לבני מלכה
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
what didn't work?
– DasSaffe
Nov 8 at 9:21
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
why do you have to use a table?
– pasine
Nov 8 at 9:30
|
show 2 more comments
so why do not use what you found... conver it toli
– לבני מלכה
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
what didn't work?
– DasSaffe
Nov 8 at 9:21
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
why do you have to use a table?
– pasine
Nov 8 at 9:30
so why do not use what you found... conver it to
li– לבני מלכה
Nov 8 at 9:16
so why do not use what you found... conver it to
li– לבני מלכה
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
what didn't work?
– DasSaffe
Nov 8 at 9:21
what didn't work?
– DasSaffe
Nov 8 at 9:21
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
why do you have to use a table?
– pasine
Nov 8 at 9:30
why do you have to use a table?
– pasine
Nov 8 at 9:30
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Use code as below:
See here:https://codepen.io/leenmalka/pen/rQxEea
<table class='circle-container'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
Css:
@import "compass/css3";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
border-radius: 50%;
padding: 0;
> * {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -($item-size / 2);
width: $item-size;
height: $item-size;
$angle: (360 / $item-count);
$rot: 0;
@for $i from 1 through $item-count {
&:nth-of-type(#{$i}) {
transform: rotate($rot * 1deg) translate($circle-size / 2) rotate($rot * -1deg);
}
$rot: $rot + $angle;
}
}
}
.circle-container tr{
@include on-circle($item-count: 25, $circle-size: 20em, $item-size: 1em);
margin: 5em auto 0;
border: solid 5px tomato;
td {
display: block;
max-width: 100%;
border-radius: 50%;
filter: grayscale(100%);
border: solid 5px tomato;
transition: .15s;
&:hover {
filter: grayscale(0);
}
}
}
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside theliwasimgin original one I tried to use the same... the reason is :> * {in scss
– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Use code as below:
See here:https://codepen.io/leenmalka/pen/rQxEea
<table class='circle-container'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
Css:
@import "compass/css3";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
border-radius: 50%;
padding: 0;
> * {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -($item-size / 2);
width: $item-size;
height: $item-size;
$angle: (360 / $item-count);
$rot: 0;
@for $i from 1 through $item-count {
&:nth-of-type(#{$i}) {
transform: rotate($rot * 1deg) translate($circle-size / 2) rotate($rot * -1deg);
}
$rot: $rot + $angle;
}
}
}
.circle-container tr{
@include on-circle($item-count: 25, $circle-size: 20em, $item-size: 1em);
margin: 5em auto 0;
border: solid 5px tomato;
td {
display: block;
max-width: 100%;
border-radius: 50%;
filter: grayscale(100%);
border: solid 5px tomato;
transition: .15s;
&:hover {
filter: grayscale(0);
}
}
}
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside theliwasimgin original one I tried to use the same... the reason is :> * {in scss
– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
add a comment |
up vote
2
down vote
accepted
Use code as below:
See here:https://codepen.io/leenmalka/pen/rQxEea
<table class='circle-container'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
Css:
@import "compass/css3";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
border-radius: 50%;
padding: 0;
> * {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -($item-size / 2);
width: $item-size;
height: $item-size;
$angle: (360 / $item-count);
$rot: 0;
@for $i from 1 through $item-count {
&:nth-of-type(#{$i}) {
transform: rotate($rot * 1deg) translate($circle-size / 2) rotate($rot * -1deg);
}
$rot: $rot + $angle;
}
}
}
.circle-container tr{
@include on-circle($item-count: 25, $circle-size: 20em, $item-size: 1em);
margin: 5em auto 0;
border: solid 5px tomato;
td {
display: block;
max-width: 100%;
border-radius: 50%;
filter: grayscale(100%);
border: solid 5px tomato;
transition: .15s;
&:hover {
filter: grayscale(0);
}
}
}
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside theliwasimgin original one I tried to use the same... the reason is :> * {in scss
– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Use code as below:
See here:https://codepen.io/leenmalka/pen/rQxEea
<table class='circle-container'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
Css:
@import "compass/css3";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
border-radius: 50%;
padding: 0;
> * {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -($item-size / 2);
width: $item-size;
height: $item-size;
$angle: (360 / $item-count);
$rot: 0;
@for $i from 1 through $item-count {
&:nth-of-type(#{$i}) {
transform: rotate($rot * 1deg) translate($circle-size / 2) rotate($rot * -1deg);
}
$rot: $rot + $angle;
}
}
}
.circle-container tr{
@include on-circle($item-count: 25, $circle-size: 20em, $item-size: 1em);
margin: 5em auto 0;
border: solid 5px tomato;
td {
display: block;
max-width: 100%;
border-radius: 50%;
filter: grayscale(100%);
border: solid 5px tomato;
transition: .15s;
&:hover {
filter: grayscale(0);
}
}
}
Use code as below:
See here:https://codepen.io/leenmalka/pen/rQxEea
<table class='circle-container'>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
</table>
Css:
@import "compass/css3";
@mixin on-circle($item-count, $circle-size, $item-size) {
position: relative;
width: $circle-size;
height: $circle-size;
border-radius: 50%;
padding: 0;
> * {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -($item-size / 2);
width: $item-size;
height: $item-size;
$angle: (360 / $item-count);
$rot: 0;
@for $i from 1 through $item-count {
&:nth-of-type(#{$i}) {
transform: rotate($rot * 1deg) translate($circle-size / 2) rotate($rot * -1deg);
}
$rot: $rot + $angle;
}
}
}
.circle-container tr{
@include on-circle($item-count: 25, $circle-size: 20em, $item-size: 1em);
margin: 5em auto 0;
border: solid 5px tomato;
td {
display: block;
max-width: 100%;
border-radius: 50%;
filter: grayscale(100%);
border: solid 5px tomato;
transition: .15s;
&:hover {
filter: grayscale(0);
}
}
}
edited Nov 8 at 9:33
answered Nov 8 at 9:26
לבני מלכה
7,3911323
7,3911323
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside theliwasimgin original one I tried to use the same... the reason is :> * {in scss
– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
add a comment |
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside theliwasimgin original one I tried to use the same... the reason is :> * {in scss
– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
thanks, that looks great. Just a small question if you don't mind. Do I have to use divs ?
– Jason
Nov 8 at 9:29
because inside the
li was img in original one I tried to use the same... the reason is :> * { in scss– לבני מלכה
Nov 8 at 9:30
because inside the
li was img in original one I tried to use the same... the reason is :> * { in scss– לבני מלכה
Nov 8 at 9:30
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
ok, thanks a lot for your help really.
– Jason
Nov 8 at 9:31
1
1
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
but you can do it without I edited answer:codepen.io/leenmalka/pen/rQxEea
– לבני מלכה
Nov 8 at 9:32
great! I'll use this one :)
– Jason
Nov 8 at 9:33
great! I'll use this one :)
– Jason
Nov 8 at 9:33
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204616%2fcircular-html-table%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
so why do not use what you found... conver it to
li– לבני מלכה
Nov 8 at 9:16
I tried it already, but it didn't work.
– Jason
Nov 8 at 9:16
what didn't work?
– DasSaffe
Nov 8 at 9:21
td elements were not aligned in circle.
– Jason
Nov 8 at 9:22
why do you have to use a table?
– pasine
Nov 8 at 9:30