Center Tabs on Product Page

Highlighted
Tourist
5 0 1

Hello everyone! 

I added tabs in description, and this is the result:

opkiofa.png

My question is: How can I center them? When I change the code from float: left to float: center it just stacks them one above the other like this:

kfopakf.png  

I would like to look like the first picture, but centered. Does anyone know how can I achieve this?

I am attaching the code 

<style>
  ul.tabs {
  border-bottom: 1px solid #DDDDDD;
  display: block;
  margin: 0 0 20px;
  padding: 0;
}
ul.tabs li {
  display: block;
  float: center;
  height: 40px;
  margin-bottom: 0;
  padding: 0;
  width: auto;
}
ul.tabs li a {
  -moz-border-bottom-colors: none;
  -moz-border-image: none;
  -moz-border-left-colors: none;
  -moz-border-right-colors: none;
  -moz-border-top-colors: none;
  background: none repeat scroll 0 0 #ffffff;
  border-color: #dddddd !important;
  border-style: solid;
  border-width: 1px 1px 0 1px;
  display: block;
  font-size: 13px;
  height: 40px;
  line-height: 40px;
  margin: 0;
  padding: 0 20px;
  text-decoration: none;
  width: auto;
  color: #303030;
  border-bottom:none !important;
}
ul.tabs li a.active {
  background: none repeat scroll 0 0 #d5b63e;
  border-left-width: 1px;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  color: #d5b63e;
  height: 40px;
  margin: 0 0 0 -1px;
  padding-top: 0px;
  position: relative;
  top: 0px;
  font-size: 13px;
  color: #ffffff;
}
ul.tabs li:first-child a.active {
  margin-left: 0;
}
ul.tabs li:first-child a {
  border-top-left-radius: 2px;
  border-width: 1px 1px 0;
}
ul.tabs li:last-child a {
  border-top-right-radius: 2px;
}
ul.tabs:before, ul.tabs:after {
  content: " ";
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  width: 0;
}
ul.tabs:after {
  clear: both;
}
</style>

{% else %}
	{{ description }}
{% endif %}
0 Likes
Highlighted
Shopify Partner
1593 347 465

Hey @woodgradro 

I read your description. Can you please provide  your webshop URL?

I will check and provide you solution here.

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes