Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Tuesday, August 3rd at 3pm PST / 6pm EST. Learn more
  • GoDaddy Community
  • GoDaddy Website Builders
  • GoDaddy Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    SantaBroo
    Getting Started

    Custom HTML and CSS

    Hello, when adding custom HTML and CSS. Does CSS needs to be inline or I can add it between<style> </style> tags.

     

    I wanted to add custom table.

    You can check the code here to see if there is anyproblems with adding it "https://codepen.io/SantaB...

     

    Any tips on how can I implement it into HTML section?

    1 ACCEPTED SOLUTION

    There's a typo on the opening style tag.  I also suggest removing "min-height: 100vh;" as it causes problems with how the height of the section is calculated.

     

    <style>
    .limiter {
      width: 100%;
      margin: 0 auto;
    }
    
    .container-table100 {
      width: 100%;
    
      background: #c850c0;
      background: -webkit-linear-gradient(45deg, #4158d0, #c850c0);
      background: -o-linear-gradient(45deg, #4158d0, #c850c0);
      background: -moz-linear-gradient(45deg, #4158d0, #c850c0);
      background: linear-gradient(45deg, #4158d0, #c850c0);
    
      display: -webkit-box;
      display: -webkit-flex;
      display: -moz-box;
      display: -ms-flexbox;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      padding: 33px 30px;
    }
    
    .wrap-table100 {
      width: 1170px;
    }
    
    table {
      border-spacing: 1;
      border-collapse: collapse;
      background: white;
      border-radius: 10px;
      overflow: hidden;
      width: 100%;
      margin: 0 auto;
      position: relative;
    }
    table * {
      position: relative;
    }
    table td, table th {
      padding-left: 8px;
    }
    table thead tr {
      height: 60px;
      background: #36304a;
    }
    table tbody tr {
      height: 50px;
    }
    table tbody tr:last-child {
      border: 0;
    }
    table td, table th {
      text-align: left;
    }
    table td.l, table th.l {
      text-align: right;
    }
    table td.c, table th.c {
      text-align: center;
    }
    table td.r, table th.r {
      text-align: center;
    }
    
    
    .table100-head th{
      font-family: OpenSans-Regular;
      font-size: 18px;
      color: #fff;
      line-height: 1.2;
      font-weight: unset;
    }
    
    tbody tr:nth-child(even) {
      background-color: #f5f5f5;
    }
    
    tbody tr {
      font-family: OpenSans-Regular;
      font-size: 15px;
      color: #808080;
      line-height: 1.2;
      font-weight: unset;
    }
    
    tbody tr:hover {
      color: #555555;
      background-color: #f5f5f5;
      cursor: pointer;
    }
    
    .column1 {
      width: 260px;
      padding-left: 40px;
    }
    
    .column2 {
      width: 160px;
    }
    
    .column3 {
      width: 245px;
    }
    
    .column4 {
      width: 110px;
      text-align: right;
    }
    
    .column5 {
      width: 170px;
      text-align: right;
    }
    
    .column6 {
      width: 222px;
      text-align: right;
      padding-right: 62px;
    }
    </style>
    	
    	<div class="limiter">
    		<div class="container-table100">
    			<div class="wrap-table100">
    				<div class="table100">
    					<table>
    						<thead>
    							<tr class="table100-head">
    								<th class="column1">Date</th>
    								<th class="column2">Order ID</th>
    								<th class="column3">Name</th>
    								<th class="column4">Price</th>
    								<th class="column5">Quantity</th>
    								<th class="column6">Total</th>
    							</tr>
    						</thead>
    						<tbody>
    								<tr>
    									<td class="column1">2017-09-29 01:22</td>
    									<td class="column2">200398</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-28 05:57</td>
    									<td class="column2">200397</td>
    									<td class="column3">Samsung S8 Black</td>
    									<td class="column4">$756.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$756.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-26 05:57</td>
    									<td class="column2">200396</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$22.00</td>
    									<td class="column5">2</td>
    									<td class="column6">$44.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-25 23:06</td>
    									<td class="column2">200392</td>
    									<td class="column3">USB 3.0 Cable</td>
    									<td class="column4">$10.00</td>
    									<td class="column5">3</td>
    									<td class="column6">$30.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-24 05:57</td>
    									<td class="column2">200391</td>
    									<td class="column3">Smartwatch 4.0 LTE Wifi</td>
    									<td class="column4">$199.00</td>
    									<td class="column5">6</td>
    									<td class="column6">$1494.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-23 05:57</td>
    									<td class="column2">200390</td>
    									<td class="column3">Camera C430W 4k</td>
    									<td class="column4">$699.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$699.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-22 05:57</td>
    									<td class="column2">200389</td>
    									<td class="column3">Macbook Pro Retina 2017</td>
    									<td class="column4">$2199.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$2199.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-21 05:57</td>
    									<td class="column2">200388</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-19 05:57</td>
    									<td class="column2">200387</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-18 05:57</td>
    									<td class="column2">200386</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-22 05:57</td>
    									<td class="column2">200389</td>
    									<td class="column3">Macbook Pro Retina 2017</td>
    									<td class="column4">$2199.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$2199.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-21 05:57</td>
    									<td class="column2">200388</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-19 05:57</td>
    									<td class="column2">200387</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-18 05:57</td>
    									<td class="column2">200386</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								
    						</tbody>
    					</table>
    				</div>
    			</div>
    		</div>
    	</div>
    

    View solution in original post

    3 REPLIES 3
    Nate
    Super User II

    Yes, you can put the <style> tags at the top of an HTML section.  The CSS would only affect that section.

    SantaBroo
    Getting Started

    But why doesnt it work. Like here is the code that I use for it

    https://pastebin.com/aD29KWKz

     

    And this is what I get ? Here is the link of the website if you could help www.builtinbenchmarks.com

    SantaBroo_0-1610297010947.png

     

    There's a typo on the opening style tag.  I also suggest removing "min-height: 100vh;" as it causes problems with how the height of the section is calculated.

     

    <style>
    .limiter {
      width: 100%;
      margin: 0 auto;
    }
    
    .container-table100 {
      width: 100%;
    
      background: #c850c0;
      background: -webkit-linear-gradient(45deg, #4158d0, #c850c0);
      background: -o-linear-gradient(45deg, #4158d0, #c850c0);
      background: -moz-linear-gradient(45deg, #4158d0, #c850c0);
      background: linear-gradient(45deg, #4158d0, #c850c0);
    
      display: -webkit-box;
      display: -webkit-flex;
      display: -moz-box;
      display: -ms-flexbox;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      padding: 33px 30px;
    }
    
    .wrap-table100 {
      width: 1170px;
    }
    
    table {
      border-spacing: 1;
      border-collapse: collapse;
      background: white;
      border-radius: 10px;
      overflow: hidden;
      width: 100%;
      margin: 0 auto;
      position: relative;
    }
    table * {
      position: relative;
    }
    table td, table th {
      padding-left: 8px;
    }
    table thead tr {
      height: 60px;
      background: #36304a;
    }
    table tbody tr {
      height: 50px;
    }
    table tbody tr:last-child {
      border: 0;
    }
    table td, table th {
      text-align: left;
    }
    table td.l, table th.l {
      text-align: right;
    }
    table td.c, table th.c {
      text-align: center;
    }
    table td.r, table th.r {
      text-align: center;
    }
    
    
    .table100-head th{
      font-family: OpenSans-Regular;
      font-size: 18px;
      color: #fff;
      line-height: 1.2;
      font-weight: unset;
    }
    
    tbody tr:nth-child(even) {
      background-color: #f5f5f5;
    }
    
    tbody tr {
      font-family: OpenSans-Regular;
      font-size: 15px;
      color: #808080;
      line-height: 1.2;
      font-weight: unset;
    }
    
    tbody tr:hover {
      color: #555555;
      background-color: #f5f5f5;
      cursor: pointer;
    }
    
    .column1 {
      width: 260px;
      padding-left: 40px;
    }
    
    .column2 {
      width: 160px;
    }
    
    .column3 {
      width: 245px;
    }
    
    .column4 {
      width: 110px;
      text-align: right;
    }
    
    .column5 {
      width: 170px;
      text-align: right;
    }
    
    .column6 {
      width: 222px;
      text-align: right;
      padding-right: 62px;
    }
    </style>
    	
    	<div class="limiter">
    		<div class="container-table100">
    			<div class="wrap-table100">
    				<div class="table100">
    					<table>
    						<thead>
    							<tr class="table100-head">
    								<th class="column1">Date</th>
    								<th class="column2">Order ID</th>
    								<th class="column3">Name</th>
    								<th class="column4">Price</th>
    								<th class="column5">Quantity</th>
    								<th class="column6">Total</th>
    							</tr>
    						</thead>
    						<tbody>
    								<tr>
    									<td class="column1">2017-09-29 01:22</td>
    									<td class="column2">200398</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-28 05:57</td>
    									<td class="column2">200397</td>
    									<td class="column3">Samsung S8 Black</td>
    									<td class="column4">$756.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$756.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-26 05:57</td>
    									<td class="column2">200396</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$22.00</td>
    									<td class="column5">2</td>
    									<td class="column6">$44.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-25 23:06</td>
    									<td class="column2">200392</td>
    									<td class="column3">USB 3.0 Cable</td>
    									<td class="column4">$10.00</td>
    									<td class="column5">3</td>
    									<td class="column6">$30.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-24 05:57</td>
    									<td class="column2">200391</td>
    									<td class="column3">Smartwatch 4.0 LTE Wifi</td>
    									<td class="column4">$199.00</td>
    									<td class="column5">6</td>
    									<td class="column6">$1494.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-23 05:57</td>
    									<td class="column2">200390</td>
    									<td class="column3">Camera C430W 4k</td>
    									<td class="column4">$699.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$699.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-22 05:57</td>
    									<td class="column2">200389</td>
    									<td class="column3">Macbook Pro Retina 2017</td>
    									<td class="column4">$2199.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$2199.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-21 05:57</td>
    									<td class="column2">200388</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-19 05:57</td>
    									<td class="column2">200387</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-18 05:57</td>
    									<td class="column2">200386</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-22 05:57</td>
    									<td class="column2">200389</td>
    									<td class="column3">Macbook Pro Retina 2017</td>
    									<td class="column4">$2199.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$2199.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-21 05:57</td>
    									<td class="column2">200388</td>
    									<td class="column3">Game Console Controller</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-19 05:57</td>
    									<td class="column2">200387</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								<tr>
    									<td class="column1">2017-09-18 05:57</td>
    									<td class="column2">200386</td>
    									<td class="column3">iPhone X 64Gb Grey</td>
    									<td class="column4">$999.00</td>
    									<td class="column5">1</td>
    									<td class="column6">$999.00</td>
    								</tr>
    								
    						</tbody>
    					</table>
    				</div>
    			</div>
    		</div>
    	</div>
    

    View solution in original post