Table with 100% width will not float side-by-side
up vote
0
down vote
favorite
I created 2 tables and I want to position them side-by-side (horizontally). However they always align themselves vertically. I tried float: left;
but it didn't change a thing.
table {
float: left;
width: 100%;
border: 1px;
min-width: 100%;
position: relative;
}
css css-tables
add a comment |
up vote
0
down vote
favorite
I created 2 tables and I want to position them side-by-side (horizontally). However they always align themselves vertically. I tried float: left;
but it didn't change a thing.
table {
float: left;
width: 100%;
border: 1px;
min-width: 100%;
position: relative;
}
css css-tables
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
1
float: left;
is being made ineffective bywidth: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.
– Jason Aller
May 10 '14 at 18:03
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I created 2 tables and I want to position them side-by-side (horizontally). However they always align themselves vertically. I tried float: left;
but it didn't change a thing.
table {
float: left;
width: 100%;
border: 1px;
min-width: 100%;
position: relative;
}
css css-tables
I created 2 tables and I want to position them side-by-side (horizontally). However they always align themselves vertically. I tried float: left;
but it didn't change a thing.
table {
float: left;
width: 100%;
border: 1px;
min-width: 100%;
position: relative;
}
css css-tables
css css-tables
edited Nov 7 at 19:23
Brian Tompsett - 汤莱恩
4,153133699
4,153133699
asked May 10 '14 at 17:54
Emo-Punk
39118
39118
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
1
float: left;
is being made ineffective bywidth: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.
– Jason Aller
May 10 '14 at 18:03
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05
add a comment |
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
1
float: left;
is being made ineffective bywidth: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.
– Jason Aller
May 10 '14 at 18:03
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
1
1
float: left;
is being made ineffective by width: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.– Jason Aller
May 10 '14 at 18:03
float: left;
is being made ineffective by width: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.– Jason Aller
May 10 '14 at 18:03
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
display:inline-block;
probably will help. And width:100%;
sets your table width to window width, remove it.
The other thing that didn't get conveyed to the OP is that the original css had#table
which could mean that they were using duplicateid
values.
– Jason Aller
May 10 '14 at 18:30
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
display:inline-block;
probably will help. And width:100%;
sets your table width to window width, remove it.
The other thing that didn't get conveyed to the OP is that the original css had#table
which could mean that they were using duplicateid
values.
– Jason Aller
May 10 '14 at 18:30
add a comment |
up vote
0
down vote
accepted
display:inline-block;
probably will help. And width:100%;
sets your table width to window width, remove it.
The other thing that didn't get conveyed to the OP is that the original css had#table
which could mean that they were using duplicateid
values.
– Jason Aller
May 10 '14 at 18:30
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
display:inline-block;
probably will help. And width:100%;
sets your table width to window width, remove it.
display:inline-block;
probably will help. And width:100%;
sets your table width to window width, remove it.
edited May 10 '14 at 18:07
answered May 10 '14 at 17:57
nicael
13.5k104071
13.5k104071
The other thing that didn't get conveyed to the OP is that the original css had#table
which could mean that they were using duplicateid
values.
– Jason Aller
May 10 '14 at 18:30
add a comment |
The other thing that didn't get conveyed to the OP is that the original css had#table
which could mean that they were using duplicateid
values.
– Jason Aller
May 10 '14 at 18:30
The other thing that didn't get conveyed to the OP is that the original css had
#table
which could mean that they were using duplicate id
values.– Jason Aller
May 10 '14 at 18:30
The other thing that didn't get conveyed to the OP is that the original css had
#table
which could mean that they were using duplicate id
values.– Jason Aller
May 10 '14 at 18:30
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23584480%2ftable-with-100-width-will-not-float-side-by-side%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you need to add your code here so we can help you.
– web-tiki
May 10 '14 at 17:56
Could you add the actual code/styling you're currently using?
– Joachim Isaksson
May 10 '14 at 17:56
1
float: left;
is being made ineffective bywidth: 100%
. If the table is 100% wide there is no room next to it for the next table to float into position.– Jason Aller
May 10 '14 at 18:03
Thanks man! This answers it
– Emo-Punk
May 10 '14 at 18:05