I'm currently facing an issue where I'd like to center align all tables similar to the 'Ruby Table.' However, I'm unsure of how to achieve this.
You may also observe that some tables have varying widths. What CSS rule can I apply to adjust the width of the entire table so they are consistent?
Below is my HTML code:
<!DOCTYPE html>
<html>
<head>
<title>Personal Bests</title>
<link rel="stylesheet" type="text/css" href="css/home.css">
<meta charset="UTF-8">
</head>
<body>
<main>
<div id="section">
<article>
<h2>FireFalcons1 Best Times</h2>
<p>
Below you will find all of my best times on Time Trials Max Speed (100%) and Story Mode (100%)
</p>
<p class="TA">
TIME ATTACK - MAX SPEED (100%)
</article>
</div>
<!--Ruby HMTL Table-->
<table class="rubyTable">
<tr>
<th class="rubyHeader" colspan="6">Ruby Cup</th>
</tr>
<!-- More table content here -->
</table>
<!--Sapphire HMTL Table-->
<table class="sapphireTable">
<!-- Sapphire table content goes here-->
</table>
<!--End of Table-->
<hr>
<footer>
<strong>
Copyright © 2016 Stephen Fawcett, All rights reserved
</strong>
</footer>
</main>
</body>
</html>
And here is my CSS related to 'Personal Bests':
/* Personal Bests CSS */
.TA {
/* Custom styles for TA */
}
.rubyTable {
/* Styling for Ruby Table */
}
/* Additional CSS for other tables */
.tg .tg-mzmv {
/* Styling for specific elements */
}
Please focus only on the CSS located under the "Personal Bests CSS" comment.