centering
Date: 05/06/07
(HTML Help) Keywords: css, html
I took this code/layout to help me make my own and so far, so good, but I can't seem to get the content/entries centered with the header.
/* Template: (#27) Slapping Someone With Silence */
/* Date: April 14, 2007 */
/* S2 Style: Mixit */
/* Available at http://community.livejournal.com/thefulcrum/ */
/* Made by Liz a.k.a. grrliz.livejournal.com */
/* Brushes by Jason Gaylor http://www.designfruit.com/jasongaylor/blog/ */
font {font-family: inherit; font-size: inherit; color: inherit;}
html {margin: 0px; padding: 0px; font-size: 100%; /* IE hack */ }
body {
margin: 0px;
padding: 0px;
background: url(http://i14.photobucket.com/albums/a332/slayerme/layoutbg.png) top center repeat-y #efdfa4;
color: #796313;
font-family: georgia, "palatino linotype", "times new roman", serif;
font-size: 60%;
text-align: center;
align: center;
}
a, a:link, a:visited, a:active {color: #93ad03; text-decoration: none;}
a:hover {color: #8d6f00; }
blockquote {margin: 0.8em 3em; padding: 0.8em; border: 1px solid #adca0b; background: #eeeeee;}
ol {list-style-type: decimal-leading-zero;}
input, textarea, select {border: 1px solid #adca0b; background: #eeeeee;}
/* ----------------------------------------- */
/* ---------- PAGE STRUCTURE --------------- */
/* ----------------------------------------- */
/* -- don't touch the stuff below -- */
#page, #header, #content, #footer {position: relative; top: 0;}
#alpha, #beta {display: inline; float: left; position: relative; top: 0px;}
#footer {margin: -1px 0 0 0; /* HACK - removes space between content and footer */}
#page-inner, #header-inner, #content-inner, #alpha-inner, #beta-inner, #gamma-inner, #footer-inner {position: static;}
#header-inner, #alpha-inner, #beta-inner, #gamma-inner {overflow: hidden; /* hide content that is larger than the element dimensions */}
#alpha-inner[id] { overflow: visible; } /* FF MAC & PC will clip pager-top when accessing page anchor */
/* -- don't touch the stuff above -- */
#container-inner {min-height: 100%; text-align: left;}
#page {margin: 0px auto; padding: 0px;}
#header {position: relative; height: 246px; margin: 0px auto; background: url(http://i14.photobucket.com/albums/a332/slayerme/headergolden.png) bottom center no-repeat transparent; text-align: center;}
#header-inner {background: url() bottom center no-repeat; }
#content {float: center; text-align: left;}
#alpha {width: 534px;}
#alpha-inner {margin: 0px;}
.layout-tw #alpha {float: right; background: #fcfae8;}
.lj-view-archive #alpha-inner,
.lj-view-month #alpha-inner,
.lj-view-tags #alpha-inner {padding: 20px 0px;}
#beta {width: 200px; align: center;}
#beta-inner {padding: 0px 20px;}
#sidebar {background: #efdfa4; position: center;}
#footer {clear: both;}
.lj-view-tags #alpha {padding-top: 1.8em;}
/* ---------------------------- */
/* ---------- HEADER ---------- */
/* ---------------------------- */
#header-content {padding: 1.8em;}
.layout-tw #header-content,
.layout-wt #header-content {width: 534px; margin: 0px auto;}
.layout-twt #header-content,
.layout-wtt #header-content {width: 534px; margin: 0px auto;}
#header-content {overflow: hidden; text-transform: uppercase;}
#header-text ul.nav {margin-top: 214px; padding: 0px; text-transform: lowercase; font-size: 1.2em; color: #8d6f00; text-align: bottom center;}
#header-text ul.nav li {margin: 0px; padding: 0 0.9em; display: inline;}
#header-text ul.nav li.item {border: 0px;}
#header-text ul.nav a {color: #ab890b; text-decoration: none;}
#header-text ul.nav a:hover {color: #8d6f00;}
#header-name {padding: 0.4em 0; font-size: 2.4em; line-height: 1.2em; letter-spacing: 0.2em; display: none;}
#header-name a {text-decoration: none;}
#header-description {color: #5a604e; font-size: 1.1em; line-height: 1.2em; letter-spacing: 0.3em; font-variant: small-caps;}
/* ----------------------------- */
/* ---------- ENTRIES ---------- */
/* ----------------------------- */
/* previous and next links */
.stream-header {display: none; padding: 10px 20px; text-align: center;}
.stream-footer {}
/* entry container */
.asset {margin: 0 0 4em 0; padding: 0px;}
.asset-inner {}
.asset-header {}
.lj-view-entry .asset-header {padding: 0; }
/* entry subject */
h2.page-header2 {font-size: 1.6em; font-weight: normal;}
h2.page-header2 a, .lj-view-tags h2 {display: block; text-decoration: none; color: #93ad03;}
abbr.datetime {
display: block;
margin: 0px; padding: 0.8em 0;
list-style-type: none;
color: #666666;
font-size: 90%;]
font-weight: bold;
font-family: arial, tahoma, verdana, serif;
text-transform: uppercase;
}
/* entry body, meta, tags */
.asset-content {}
/* entry text */
.asset-body {padding: 0 0 0.8em 0;}
.asset-body a {font-weight: bold; text-decoration: underline;}
.asset-body a:hover {}
.asset-body dt {border-bottom: 1px solid #adca0b; font-weight: bold;}
.asset-body dd {margin-left: 3.6em; padding: 10px; border: 1px solid #adca0b; border-top: 0px; background: #eeeeee; border: 1px solid adca0b; border-top: 0px; }
.asset-body dt a, .asset-body dl a, .asset-body blockquote a {border-bottom: 1px solid #adca0b; background: transparent; color: #333333;}
/* date and time */
div.asset-header ul {margin: 0px !important; padding: 0px !important;}
div.asset-header li.item {padding: 0px;}
.ljuser {display: inline !important;}
/* userpic */
.user-icon {float: left; margin-right: 20px; padding: 1px; background: transparent !important; text-align: center;}
.user-icon img {border: 1px solid #cccccc;}
.user-icon span {background-color: transparent !important; text-align: center;}
.user-icon a {background: transparent; color: #333333;}
.user-icon a:hover {color: #adca0b;}
/* mood, music, location */
.lj-currents ul {margin: 0px; padding: 0.8em 0 0 0; border-top: 1px solid #dddddd;}
.lj-currents ul li {list-style: none;}
.lj-currents img {display: none;}
.entryMetadata-label {font-weight:bold;}
.entryMetadata-content {margin-left: 2px;}
/* --- tags --- */
.asset-tags {padding-bottom: 0.8em;}
.asset-tags-header {
display: block; float: left;
width: 3.5em; /* matches .asset-tags-content width */
height: 100% !important;
margin: 0px; padding: 0px;
font-size: 1em !important;
}
.asset-tags-list {margin: 0 0 0 3.5em; padding: 0px; list-style-type: none;}
.asset-tags-list li {display: inline; padding-right: 5px;}
.asset-tags-list a {white-space: normal !important;}
/* comments bar */
ul.asset-meta-list {clear: both; margin: 0px; padding: 0.8em 0; border-top: 1px solid #dddddd; list-style-type: none;}
ul.asset-meta-list .item {border: 0px;}
ul.asset-meta-list a {color: #333333;}
ul.asset-meta-list a:hover {color: #93ad03;}
li.asset-meta-comments {display: inline; margin: 0px 10px 0px 0px;}
.prevnext, .prev, .next {padding: 5px 0px;}
/* ----------------------------- */
/* ---------- SIDEBAR ---------- */
/* ----------------------------- */
.widget {padding: 0.8em 0; border-bottom: 1px solid #adca0b; color: #637501;}
.widget-inner {}
.widget-header {margin: 0px; padding: 0px 0px 5px 0px; font-size: 1.2em; font-variant: small-caps;}
.widget-content {margin: 0px; padding: 0px;}
.widget ul {margin: 0px; padding: 0px; list-style-type: none;}
.widget ul li {padding-left: 17px; background: url(http://img.photobucket.com/albums/v388/grrliz/other/layouts/free/27_sidebarbullet.gif) 0px 3px no-repeat;}
.widget a {color: #637501;}
.widget a:hover {color: #333333;}
/* profile */
.about-me-widget {display: none; text-align: center;}
.about-me-widget .widget-header a {color: #333333;}
.about-me-widget .widget-header a:hover {}
.about-me-widget dl, .about-me-widget dd, .about-me-widget dt {margin: 0px; padding: 0px; width: 100%;}
/* calendar */
.calendar-widget {}
.calendar-widget table {width: 100%; text-align: center;}
.calendar-widget p {margin: 5px 0px; padding: 0px; text-align: center;}
.calendar-widget tr:first-child a, .calendar-widget tr:first-child a:hover {background-color: transparent; border: 0px; font-weight: bold;}
.calendar-widget td a {display: block; width: 100%; border: 1px solid #adca0b; background: #c8db5b;}
.calendar-widget td a:hover {display: block; width: 100%; border: 1px solid #92ac03; background: #adca0b;}
/* link list */
.typelist-widget li.item {margin: 0px; }
/* tags */
.categories-widget .widget-footer {padding: 20px 0px 0px 0px;}
.categories-widget li.item {margin: 0px; }
.categories-widget li.tag {display: inline; padding: 0px 1px; background: none; }
/* post summary */
.archive-widget li.item {margin: 0px 0px 5px 0px;}
.links-widget .widget-list .item {
margin-bottom: .2em;
border: none !important;
}
.widget-list .tagcloud {
list-style: none !important;
display: inline !important;
color: #ff0000 !important;
white-space: nowrap !important;
border-left: 0 !important;
width: 100% !important;
}
/* syndication, LiveJournal link, designer link */
.syndicate-widget,
.powered-widget,
.designed-widget {display: none;}
/* ----------------------------------- */
/* ---------- COMMENTS PAGE ---------- */
/* ----------------------------------- */
/* Comments ---------------------------------------*/
#comments {padding: 0px;}
div.comments-inner h2 {margin: 0px; padding: 1.5em 0 0 0; font-size: 1.4em;}
.comment {margin-bottom: 3em; padding: 0.8em 0; border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc;}
.comment-odd {}
.comment-even {background: #ffffff;}
.comments-nav {margin: 20px; text-align:center;}
/* --- reply, freeze, screen, etc --- */
.comment-links {margin-top: 0.9em; font-weight: normal; text-align: right; font-size: 1em;}
.comment-subject {font-weight: bold; }
.comment-date {margin-top: 0.9em; margin-bottom: 0.9em;}
/* Fix height in IE */
.comment {height: 1%;}
/* Quick Reply ---------------------------------------*/
.quickreply {margin-top: 1em; width:90%; padding-top: 5px; padding-bottom: 10px;}
#commenttext, #subject {width: 90%;}
#comment-form {width: 500px;}
/* ------------------------------ */
/* ---------- ARCHIVES ---------- */
/* ------------------------------ */
/* Calendar/Archive ---------------------------------------------------------------------- */
ul.year {text-align: center; padding: 0px;}
ul.year li {display: inline; padding: 0px 5px;}
table.yeartable {margin-left: auto; margin-right: auto;}
table.yeartable td.yeardate, table.yeartable td.yearday {border: 1px solid #cccccc;}
table.yeartable td.yearday {background-color: #e9e9e9; text-align: center;}
td.yearmonth {border-style: none; font-weight: bold;}
dd.viewsubjects {margin: 0 0 .75em .75em;}
.lj-view-month table {}
.lj-view-month widget table {margin: 0px !important;}
/* -------------------------- */
/* ---------- MISC ---------- */
/* -------------------------- */
/* Sponsored Plus ---------------------------------------*/
#ad-5linkunit {
clear: both;
}
#ad-leaderboard {
margin-bottom: 10px;
}
/* Utility Code --------------------------------------------------- */
/* clear floats, inspired by positioniseverything.net/easyclearing.html */
.comment-body:after,
#page-inner:after,
#header-inner:after,
#header-photo:after,
#content-inner:after,
#alpha-inner:after,
#beta-inner:after,
#gamma-inner:after,
#delta-inner:after,
#footer-inner:after,
.widget .user-pic:after {
content: ".";
display: block;
visibility: hidden;
clear: both;
height: 0.1px;
font-size: 0.1em;
line-height: 0.1px;
}
/* float in post bodies around enclosures */
#content-inner,
.asset-body {
height: 1%;
}
/* Win IE < 7 */
* html #header-name a { word-wrap: break-word; }
/* ----------------------------------------------------------------------- */
/* ---------- PLEASE PASTE ANY FURTHER CSS OVERRIDES BELOW HERE ---------- */
/* ----------
Source: http://community.livejournal.com/htmlhelp/2395482.html