Table with 100% width will not float side-by-side











up vote
0
down vote

favorite
1












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;
}









share|improve this question
























  • 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 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















up vote
0
down vote

favorite
1












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;
}









share|improve this question
























  • 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 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













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





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;
}









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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


















  • 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 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
















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












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.






share|improve this answer























  • 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











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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

























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.






share|improve this answer























  • 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















up vote
0
down vote



accepted










display:inline-block;


probably will help. And width:100%; sets your table width to window width, remove it.






share|improve this answer























  • 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













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.






share|improve this answer














display:inline-block;


probably will help. And width:100%; sets your table width to window width, remove it.







share|improve this answer














share|improve this answer



share|improve this answer








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 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
















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


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini