So I found a theme I like, and it even has a categories section that I like. However, the way the categories are setup in the CSS stylesheet means that they can only start off from the left or right because I was told "float" doesn't do center. So how would I go about centering the categories? I was told to use a div container, but I don't know enough about div to make on from scratch.
CSS "float" problem (need to center!)
8
So I found a theme I like, and it even has a categories section that I like. However, the way the categories are setup in the CSS stylesheet means that they can only start off from the left or right because I was told "float" doesn't do center. So how would I go about centering the categories?
I was told to use a div container, but I don't know enough about div to make on from scratch.
PC Smarts | Just another WordPress site
thats the website, what I want to center is right under the image.
Here is the code pertaining to the categories, it was taken from the stylesheet. and was the only code I was able to find.
I was told to use a div container, but I don't know enough about div to make on from scratch.
PC Smarts | Just another WordPress site
thats the website, what I want to center is right under the image.
Here is the code pertaining to the categories, it was taken from the stylesheet. and was the only code I was able to find.
Code:
/* --- Sub Nav --- */
nav#subnav {
margin:0;
padding:0;
overflow: hidden;
}
nav#subnav ul.menu {
margin: 5px 0 0 0;
padding:16px 0 30px;
border-top: 1px solid #ddd;
overflow: hidden;
}
nav#subnav ul.menu li.menu-item {
width: 17%;
margin: auto;
float: left;
list-style: none;
}
nav#subnav ul.menu li.menu-item a {
font-size: .8em;
text-transform: uppercase;
font-weight: bold;
}
nav#subnav ul.menu li.menu-item ul.sub-menu {
margin: 0;
padding: 6px 0 0;
overflow: hidden;
}
nav#subnav ul.menu li.menu-item ul.sub-menu li.menu-item {
width: 100%;
letter-spacing: 0;
}
nav#subnav ul.menu li.menu-item ul.sub-menu li.menu-item a {
font-size: .8em;
font-weight: normal;
line-height:2;
text-transform: none;
} - xythis
- solidsoul
- Theory5
- [1] reply
- xythis
- Theory5
- [1] reply
- xythis
- htmlthis
Next Topics on Trending Feed
-
8