2014-10-10, 08:41 PM
Hi, im making a few basic edits to my theme and can't get my container to be centered.
I'm fairly new to css and coding in general so sorry if its a real basic thing..
I have tried the code:
My body/container part of the stylesheet code:
also, how would i go about adding a gap above and below the container?
Site link in signature if needed.
Solved
Body/Container part of stylesheet:
I'm fairly new to css and coding in general so sorry if its a real basic thing..
I have tried the code:
margin: 0 auto;
but to no avail, maybe its in the wrong place or section, please could someone help.My body/container part of the stylesheet code:
body {
background: #fff;
background-image: url("/images/20130512_180856.jpg");
background-attachment: fixed;
background-size: cover;
line-height: 1.4;
margin: 0;
overflow-y: scroll;
color: #333;
width: 76%;
font-family: Tahoma, Verdana, Arial, Sans-Serif;
font-size: 13px;
}
a:link {
color: #0072BC;
text-decoration: none;
}
a:visited {
color: #0072BC;
text-decoration: none;
}
a:hover,
a:active {
color: #0072BC;
text-decoration: underline;
}
#container {
width: 76%;
opacity: .9;
border: 8px solid #000;
text-align: left;
line-height: 1.4;
margin: 0 auto;
min-width: 990px;
font-family: Tahoma, Verdana, Arial, Sans-Serif;
font-size: 13px;
}
also, how would i go about adding a gap above and below the container?
Site link in signature if needed.
Solved
Body/Container part of stylesheet:
body {
padding-top: 50px;
padding-bottom: 50px;
background: #fff;
background-image: url("/images/20130512_180856.jpg");
background-attachment: fixed;
background-size: cover;
line-height: 1.4;
margin: 0 auto;
position: relative;
overflow-y: scroll;
color: #333;
width: 76%;
font-family: Tahoma, Verdana, Arial, Sans-Serif;
font-size: 13px;
}
a:link {
color: #0072BC;
text-decoration: none;
}
a:visited {
color: #0072BC;
text-decoration: none;
}
a:hover,
a:active {
color: #0072BC;
text-decoration: underline;
}
#container {
opacity: .9;
border: 8px solid #000;
text-align: left;
line-height: 1.4;
margin: 0 auto;
position: relative;
min-width: 990px;
width: 76%;
font-family: Tahoma, Verdana, Arial, Sans-Serif;
font-size: 13px;
}