Table without id uses CSS from of other table's id











up vote
-2
down vote

favorite












I have a problem, that I'm using table template from web, and it's just CSS and html.. So I insert CSS to my CSS for website.. The table has set id as "tabulka", so in CSS its #tabulka etc.... Everything works fine till I made second table on that page, which has got no id assigned but it is using CSS from id "tabulka"...



CSS:



#tabulka {
overflow:hidden;
border:1px solid #d3d3d3;
background:#fefefe;
width:100%;
margin:5% 0;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);}
#tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}

#tabulka td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}

#tabulka tr.odd-row td {background:#f6f6f6;}

#tabulka td.first, th.first {text-align:left}

#tabulka td.last {border-right:none;font-size:12px;padding-top:10px;}


html:



<table id="tabulka"><tr><td>something</td></tr></table>
<table>
<form method="POST" action="admin.php">
<tr>
<td>Name:</td><td><input type="text" name="ufoname"></td>
</tr>
<tr>
<td>Max</td><td><input type="text" name="maximum"></td>
</tr>
<tr>
<td><input id="button" type="submit" name="add" value="insert"></td>
</tr>
</table>


edit: the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but I don't understand why.










share|improve this question




















  • 1




    Looks like it works fine jsfiddle.net/8fEMF
    – Mykle Nero
    Mar 4 '14 at 19:08










  • I agree with @MykleNero the code you provided works fine, we would need more details to help you.
    – atrljoe
    Mar 4 '14 at 19:10










  • guess you need to upload more CSS code..
    – Kheema Pandey
    Mar 4 '14 at 19:11










  • sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
    – Risinek
    Mar 4 '14 at 19:16

















up vote
-2
down vote

favorite












I have a problem, that I'm using table template from web, and it's just CSS and html.. So I insert CSS to my CSS for website.. The table has set id as "tabulka", so in CSS its #tabulka etc.... Everything works fine till I made second table on that page, which has got no id assigned but it is using CSS from id "tabulka"...



CSS:



#tabulka {
overflow:hidden;
border:1px solid #d3d3d3;
background:#fefefe;
width:100%;
margin:5% 0;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);}
#tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}

#tabulka td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}

#tabulka tr.odd-row td {background:#f6f6f6;}

#tabulka td.first, th.first {text-align:left}

#tabulka td.last {border-right:none;font-size:12px;padding-top:10px;}


html:



<table id="tabulka"><tr><td>something</td></tr></table>
<table>
<form method="POST" action="admin.php">
<tr>
<td>Name:</td><td><input type="text" name="ufoname"></td>
</tr>
<tr>
<td>Max</td><td><input type="text" name="maximum"></td>
</tr>
<tr>
<td><input id="button" type="submit" name="add" value="insert"></td>
</tr>
</table>


edit: the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but I don't understand why.










share|improve this question




















  • 1




    Looks like it works fine jsfiddle.net/8fEMF
    – Mykle Nero
    Mar 4 '14 at 19:08










  • I agree with @MykleNero the code you provided works fine, we would need more details to help you.
    – atrljoe
    Mar 4 '14 at 19:10










  • guess you need to upload more CSS code..
    – Kheema Pandey
    Mar 4 '14 at 19:11










  • sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
    – Risinek
    Mar 4 '14 at 19:16















up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











I have a problem, that I'm using table template from web, and it's just CSS and html.. So I insert CSS to my CSS for website.. The table has set id as "tabulka", so in CSS its #tabulka etc.... Everything works fine till I made second table on that page, which has got no id assigned but it is using CSS from id "tabulka"...



CSS:



#tabulka {
overflow:hidden;
border:1px solid #d3d3d3;
background:#fefefe;
width:100%;
margin:5% 0;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);}
#tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}

#tabulka td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}

#tabulka tr.odd-row td {background:#f6f6f6;}

#tabulka td.first, th.first {text-align:left}

#tabulka td.last {border-right:none;font-size:12px;padding-top:10px;}


html:



<table id="tabulka"><tr><td>something</td></tr></table>
<table>
<form method="POST" action="admin.php">
<tr>
<td>Name:</td><td><input type="text" name="ufoname"></td>
</tr>
<tr>
<td>Max</td><td><input type="text" name="maximum"></td>
</tr>
<tr>
<td><input id="button" type="submit" name="add" value="insert"></td>
</tr>
</table>


edit: the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but I don't understand why.










share|improve this question















I have a problem, that I'm using table template from web, and it's just CSS and html.. So I insert CSS to my CSS for website.. The table has set id as "tabulka", so in CSS its #tabulka etc.... Everything works fine till I made second table on that page, which has got no id assigned but it is using CSS from id "tabulka"...



CSS:



#tabulka {
overflow:hidden;
border:1px solid #d3d3d3;
background:#fefefe;
width:100%;
margin:5% 0;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);}
#tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}

#tabulka td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}

#tabulka tr.odd-row td {background:#f6f6f6;}

#tabulka td.first, th.first {text-align:left}

#tabulka td.last {border-right:none;font-size:12px;padding-top:10px;}


html:



<table id="tabulka"><tr><td>something</td></tr></table>
<table>
<form method="POST" action="admin.php">
<tr>
<td>Name:</td><td><input type="text" name="ufoname"></td>
</tr>
<tr>
<td>Max</td><td><input type="text" name="maximum"></td>
</tr>
<tr>
<td><input id="button" type="submit" name="add" value="insert"></td>
</tr>
</table>


edit: the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but I don't understand why.







html css html-table






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 10:35









Brian Tompsett - 汤莱恩

4,1631336100




4,1631336100










asked Mar 4 '14 at 19:04









Risinek

719




719








  • 1




    Looks like it works fine jsfiddle.net/8fEMF
    – Mykle Nero
    Mar 4 '14 at 19:08










  • I agree with @MykleNero the code you provided works fine, we would need more details to help you.
    – atrljoe
    Mar 4 '14 at 19:10










  • guess you need to upload more CSS code..
    – Kheema Pandey
    Mar 4 '14 at 19:11










  • sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
    – Risinek
    Mar 4 '14 at 19:16
















  • 1




    Looks like it works fine jsfiddle.net/8fEMF
    – Mykle Nero
    Mar 4 '14 at 19:08










  • I agree with @MykleNero the code you provided works fine, we would need more details to help you.
    – atrljoe
    Mar 4 '14 at 19:10










  • guess you need to upload more CSS code..
    – Kheema Pandey
    Mar 4 '14 at 19:11










  • sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
    – Risinek
    Mar 4 '14 at 19:16










1




1




Looks like it works fine jsfiddle.net/8fEMF
– Mykle Nero
Mar 4 '14 at 19:08




Looks like it works fine jsfiddle.net/8fEMF
– Mykle Nero
Mar 4 '14 at 19:08












I agree with @MykleNero the code you provided works fine, we would need more details to help you.
– atrljoe
Mar 4 '14 at 19:10




I agree with @MykleNero the code you provided works fine, we would need more details to help you.
– atrljoe
Mar 4 '14 at 19:10












guess you need to upload more CSS code..
– Kheema Pandey
Mar 4 '14 at 19:11




guess you need to upload more CSS code..
– Kheema Pandey
Mar 4 '14 at 19:11












sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
– Risinek
Mar 4 '14 at 19:16






sorry, that i didnt specified the problem... the problem is, that the text in second table is centered.. Probably using this line #tabulka th, td {padding:3px 10px 3px; text-align:center; }, but dont understand why.. and it seems the problem is here, becouse when i delete that part of css I uploaded, it's fine...
– Risinek
Mar 4 '14 at 19:16














2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










if you replace the line from



#tabulka th, td {padding:3px 10px 3px; text-align:center; }

to

#tabulka th, #tabulka td {padding:3px 10px 3px; text-align:center; }


the next table text will start from left instead of center.



Here is the Demo. http://jsfiddle.net/kheema/8fEMF/1/






share|improve this answer





















  • thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
    – Risinek
    Mar 4 '14 at 19:30


















up vote
0
down vote













In the first table I dont see TH tags...



 #tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}





share|improve this answer





















  • that's not the problem...
    – Risinek
    Mar 4 '14 at 19:27











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%2f22180665%2ftable-without-id-uses-css-from-of-other-tables-id%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










if you replace the line from



#tabulka th, td {padding:3px 10px 3px; text-align:center; }

to

#tabulka th, #tabulka td {padding:3px 10px 3px; text-align:center; }


the next table text will start from left instead of center.



Here is the Demo. http://jsfiddle.net/kheema/8fEMF/1/






share|improve this answer





















  • thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
    – Risinek
    Mar 4 '14 at 19:30















up vote
1
down vote



accepted










if you replace the line from



#tabulka th, td {padding:3px 10px 3px; text-align:center; }

to

#tabulka th, #tabulka td {padding:3px 10px 3px; text-align:center; }


the next table text will start from left instead of center.



Here is the Demo. http://jsfiddle.net/kheema/8fEMF/1/






share|improve this answer





















  • thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
    – Risinek
    Mar 4 '14 at 19:30













up vote
1
down vote



accepted







up vote
1
down vote



accepted






if you replace the line from



#tabulka th, td {padding:3px 10px 3px; text-align:center; }

to

#tabulka th, #tabulka td {padding:3px 10px 3px; text-align:center; }


the next table text will start from left instead of center.



Here is the Demo. http://jsfiddle.net/kheema/8fEMF/1/






share|improve this answer












if you replace the line from



#tabulka th, td {padding:3px 10px 3px; text-align:center; }

to

#tabulka th, #tabulka td {padding:3px 10px 3px; text-align:center; }


the next table text will start from left instead of center.



Here is the Demo. http://jsfiddle.net/kheema/8fEMF/1/







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 4 '14 at 19:28









Kheema Pandey

7,72421420




7,72421420












  • thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
    – Risinek
    Mar 4 '14 at 19:30


















  • thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
    – Risinek
    Mar 4 '14 at 19:30
















thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
– Risinek
Mar 4 '14 at 19:30




thank you! didn't know that, becouse I'm not using these shotcuts and as i said, its template from web! it solved everything ;)
– Risinek
Mar 4 '14 at 19:30












up vote
0
down vote













In the first table I dont see TH tags...



 #tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}





share|improve this answer





















  • that's not the problem...
    – Risinek
    Mar 4 '14 at 19:27















up vote
0
down vote













In the first table I dont see TH tags...



 #tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}





share|improve this answer





















  • that's not the problem...
    – Risinek
    Mar 4 '14 at 19:27













up vote
0
down vote










up vote
0
down vote









In the first table I dont see TH tags...



 #tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}





share|improve this answer












In the first table I dont see TH tags...



 #tabulka th, td {padding:3px 10px 3px; text-align:center; }

#tabulka th {padding-top:22px; text-shadow: 1px 1px 1px #fff; background:#e8eaeb;}






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 4 '14 at 19:24









Casanova

1




1












  • that's not the problem...
    – Risinek
    Mar 4 '14 at 19:27


















  • that's not the problem...
    – Risinek
    Mar 4 '14 at 19:27
















that's not the problem...
– Risinek
Mar 4 '14 at 19:27




that's not the problem...
– Risinek
Mar 4 '14 at 19:27


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f22180665%2ftable-without-id-uses-css-from-of-other-tables-id%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







Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff