I\'ve seen a similar topic, but not for my specific situation. I need to nest a table within the table and it will take up several cells, but when I try to nest a table it d
Do it like this (of course you'll need to fix the font size and styling, and do the other side too. Ok try this. you still need to fix the font sizing
Our Drink Prices
Drink
Size
Price
Green Tea Cooler
16 oz.
$3.75
24 oz.
$4.75
Raspberry Ice Concentration
16 oz.
$3.75
24 oz.
$4.75
Cranberry Antioxidant Blast
20 oz.
$4.75
Lemon Breeze
Iced 16 oz
Frozen 20 oz
$3.75
$4.75
/*
CSS for Lounge Project
Filename: styles.css
Author: Justus Self
Date: 3/21/17
HTML5 and CSS3 Illustrated Unit I, Lounge Independent Project
*/
/*Reset Styles*/
html, body{
font-size: 14px;
width: 100%;
}
a, body, footer, header, h1, h2, h3, img, li, nav, p, ul, table, tbody, td, tfoot, th, thead, tr{
border: 0;
padding: 0;
margin: 0;
}
img {
max-width: 100%;
height: auto;
width: auto;
}
/*Drink font colors*/
h2.green {
color: green;
}
h2.blue {
color: blue;
}
h2.purple {
color: purple;
}
h2.red {
color: red;
}
h2.yellow {
color: gold;
}
/*center and border image*/
img.smlounge {
display: block;
margin-left: auto;
margin-right: auto;
border: 3px solid;
border-color: red;
}
/*Table styles*/
td, th, td td {
border: 1px solid black;
font-size: 1.3em;
margin-left: auto;
margin-right: auto;
text-align: center;
padding: 0 1em ;
}
table {
border-collapse: collapse;
margin: 0 auto;
width:100%
}
table table{
margin:1%;
width:98%;
}
table table td{
width:50%;
}
table table tr, table table tbody{
width:100%
}
.nested{padding:0;}
td[colspan="2"] {
width: 20%;
}
.drink-name {
text-align: left;
}
- 热议问题