I was looking into ways to make tabs in CSS and came across this example:
Everything worked well, except that I can’t get it to center in the web browser. Any Ideas why?
I was looking into ways to make tabs in CSS and came across this example:
Hi @Thacodemonkey
Not sure what you need but maybe wrap the whole thing in a div like:
HTML
<div id='tabdiv'>
<!--All the your tab divs here-->
<div>
CSS
#tabdiv{
margin: auto;
width: 80%;
}
.tabs{
text-align: center;
}
.tab{
float: left/* remove this*/
display: inline-block;
}
This centered the content and the tabs to the <div class="tabs> container, but it is still on the left side of the screen. I want the tabs on the left side of the container, and the text on the left side of the container as well, I want the whole container centered on the page.
I have undeleted an earlier reply, just incase its what you need.
Wrapping it all in a div worked. Thank you.