Advertisement:

Css Comparing

Aloittaja J. Williams, toukokuu 12, 2006, 12:09:59 IP

« edellinen - seuraava »

J. Williams

Hi

I'm currently trying to sort out an error I'm getting (CSS-Related)

I need to know which bits I don't require that are specified already in SMF CSS
Sorry If It stretches the page too long :(
I'll post the two style sheets

SMF:
/* Normal, standard links. */
a:link
{
color: #000000;
text-decoration: underline;
}
a:visited, a:hover
{
color: #323232;
text-decoration: underline;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited
{
color: #000000;
text-decoration: none;
}
a.nav:hover
{
font-weight: bold;
color: #cc3333;
text-decoration: underline;
}

/* Tables should show empty cells. */
table
{
empty-cells: show;
}

/* By default (td, body..) use Tahoma in black. */
body, td
{
color: #000000;
font-size: small;
font-family: Tahoma, arial, helvetica, serif;
}

/* The main body of the entire forum. */
body
{
background-color: white;
margin: 0px;
padding: 0px;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
font-size: 9pt;
color: #000000;
font-family: Tahoma, arial, helvetica, serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check
{
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
font-size: 8pt;
font-weight: normal;
color: #000000;
font-family: Tahoma, arial, helvetica, serif;
}

/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
height: 1px;
border: 0;
color: #666666;
background-color: #666666;
}

/* A quote, perhaps from another post. */
.quote
{
color: #000000;
background-color: #C3B8D0;
border: 1px solid #000000;
margin: 1px;
padding: 1px;
font-size: x-small;
}

/* A code block - maybe even PHP;). */
.code
{
color: #000000;
background-color: #cccccc;
border: 1px solid #000000;
padding: 1px;
font-family: "courier new", helvetica, "times new roman", serif;
font-size: x-small;
width: 99%;
margin: 1px auto 1px auto;
white-space: nowrap;
overflow: auto;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
color: #000000;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: x-small;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help
{
cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
width: 96%;
}

/* Highlighted text - such as search results;). */
.highlight
{
background-color: yellow;
font-weight: bold;
color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
color: #000000;
background-color: #E1E1E1;
}
.windowbg2
{
color: #000000;
background-color: #F0F0F0;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here;). */
.signature
{
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited
{
color: white;
font-style: normal;
background-color: #6B8EAE;
}
.titlebg a:hover
{
color: #dfdfdf;
}

/* This is used for categories, page indexes, and several other areas in the forum. */
.catbg
{
background-image: url(images/catbg.jpg);
}

/* This is used for a category that has new posts in it... to make it light up. */
.catbg2
{
background-image: url(images/catbg2.jpg);
}

.catbg, .catbg2
{
font-weight: bold;
background-color: silver;
color: #000000;
}

/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
background-color: #828181;
}

/* This is used on tables that should just have a border around them. */
.tborder
{
border: 1px solid #828181;
background-color: #FFFFFF;
padding: 2px;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
font-size: x-small;
font-family: Tahoma, arial, helvetica, serif;
}
.normaltext
{
font-size: small;
}
.largetext
{
font-size: large;
}

/* This is the white header area where the title, menu bars, and header boxes are. */
#headerarea
{
background-color: white;
border-bottom: 1px solid gray;
}
/* This is the main area of the forum, the part that's gray. */
#bodyarea
{
background-color: #D4D4D4;
}
/* And this is the bottom, where the copyright is, etc. */
#footerarea
{
color: black;
background-color: white;
border-top: 1px solid gray;
}

/* This is for the special header boxes on the top (user info, key stats, news box.) */
.headertitles
{
background-color: #6B8EAE;
border: 1px solid #6B8EAE;
}
.headerbodies
{
border: 1px solid #7A7777;
background-color: #EFEFEF;
background-repeat: repeat-x;
background-position: bottom;
}

Site:


* {
margin: 0;
padding: 0;
}

html, body {
height: 100%;
}

body {
font-family: Geneva, Arial, Helvetica, sans-serif;
}

/* -------------------------------------------------------------------------- */

#container {
width: 750px;
margin: 0 auto;
min-height: 100%;
background: url(images/containerbg.gif);
padding-bottom: 50px;
border-left: 5px solid #5D5D5D;
border-right: 5px solid #5D5D5D;
}

/* -------------------------------------------------------------------------- */

.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.clearfix {
display: inline;


* html .clearfix {height: 1%;}
.clearfix {display: block;}

/* -------------------------------------------------------------------------- */
#right {
font-size:12px;
color: #999;
}
#right a:link {
font-size:12px;
color: #999;
}
#right a:visited {
font-size:12px;
color: #999;
}
#nav {
width: 213px;
float: left;
}

h4 {
font-size: 12px;
height: 18px;
color: #FFF;
padding: 3px 0 0 10px;
}

#nav ul {
list-style-type: none;
margin-bottom: 15px;
}

#nav a {
display: block;
font-size: 10px;
font-weight: bold;
color: #999;
text-decoration: none;
margin: 0 4px auto 4px;
padding-left: 5px;
border-bottom: 1px solid #CCC;
height: 12px;
padding-top: 7px;
}

#nav a:hover {
background: #F5F5F5;
}

#ad a {
width: 200px;
margin: 5px auto;
padding: 0;
border-bottom : 0;
height: 400px;
}

/* -------------------------------------------------------------------------- */

#login input {
border: 1px solid #CCC;
font-size: 14px;
font-weight: bold;
font-style: italic;
color: #CCC;
width: 200px;
margin: 3px 6px;
text-align: center;
}

#login input#submit {
font-style: normal;
color: #999;
}

#login input#uname:focus, input#pword:focus {
border: 1px solid #999;
font-style: normal;
color: #999;
}

#login fieldset {
border: 0;
}

#login legend {
display: none;
}

#login label {
display: none;
}

/* -------------------------------------------------------------------------- */

#rightside {
float: right;
width: 532px;
}
#rightside a:link {
float: right;
width: 532px;
font-size: 12px;
}
/* -------------------------------------------------------------------------- */

h1 {
height: 93px;
text-indent: -9999px;
border-bottom: 1px solid #666;
}

/* -------------------------------------------------------------------------- */

#colourchange {
height: 31px;
background: url(images/colourchangebg.gif);
text-align: right;
}

#colourchange ul {
list-style-type: none;
margin-right: 15px;
float: right;
margin-top: 5px;
}

#colourchange li {
margin-right: 5px;
width: 20px;
height: 20px;
float: left;
}

#colourchange img {
border: 0;
}

#colourchange img:hover {
border: #FFF;
}

/* -------------------------------------------------------------------------- */

h2 {
background: url(images/contenthead.gif);
height: 14px;
font-size: 12px;
border-top: 5px solid #5D5D5D;
padding: 3px 0 3px 10px;
color: #666;
}

/* -------------------------------------------------------------------------- */

h3 {
font-size: 16px;
color: #666;
margin: 15px 7px;
border-bottom: 1px solid #999;
}

#rightside p, a {
font-size: 12px;
color: #999;
text-decoration: none;
margin-left: 20px;
margin-right: 10px;
}

#colourchange a {
margin-left: 0;
}

#rightside a {
margin: 0;
}

/* -------------------------------------------------------------------------- */

#footer {
background: url(images/footer.gif);
width: 750px;
margin: 0 auto;
height: 25px;
margin-top: -25px;
text-align: right;
border-left: 5px solid #5D5D5D;
border-right: 5px solid #5D5D5D;
}

#footer p, a {
font-size: 10px;
color: #666;
margin-right: 100px;
padding-top: 4px;
}

#footer a {
margin: 0;
}


Thank You

Only one problem still will exist is I have header.php using one CSS and then SMF with it integrating using both unfortunately.
Joshua Jon Williams
Back in Action.

bloc

If you are looking at using the site css foremost - which I suspect since it has some browser-specific css workarounds etc. ;) there is a need to change a few things in SMF style.css. First, remove things in body and html tags already specified by site css. Then you need to either rename .nav inside SMF  or the #nav in site css. They will probably clash.

I suggest just changing the site.css one, since SMF templates use .nav for links, navigation tc. It should be easier to just change css+html in the site layout.

J. Williams

Joshua Jon Williams
Back in Action.

bloc

Do you need me to actually change it for you? ;D I can do that, but as I mentioned its also required to change the header.php you use.

J. Williams

OK? But I haven't got a proper way of contacting anyone except msn or chat at my website
Joshua Jon Williams
Back in Action.

bloc

No, I meant just here. The actual physical updating you will need to get someone else to do, if not yourself. If we take the 2 css and change them to:

/* Normal, standard links. */
a:link
{
color: #000000;
text-decoration: underline;
}
a:visited, a:hover
{
color: #323232;
text-decoration: underline;
}


/* Tables should show empty cells. */
table
{
empty-cells: show;
}

/* By default (td, body..) use Tahoma in black. */
body, td
{
color: #000000;
font-size: small;
font-family: Tahoma, arial, helvetica, serif;
}

/* The main body of the entire forum. */
body
{
background-color: white;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
font-size: 9pt;
color: #000000;
font-family: Tahoma, arial, helvetica, serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check
{
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
font-size: 8pt;
font-weight: normal;
color: #000000;
font-family: Tahoma, arial, helvetica, serif;
}

/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
height: 1px;
border: 0;
color: #666666;
background-color: #666666;
}

/* A quote, perhaps from another post. */
.quote
{
color: #000000;
background-color: #C3B8D0;
border: 1px solid #000000;
margin: 1px;
padding: 1px;
font-size: x-small;
}

/* A code block - maybe even PHP;). */
.code
{
color: #000000;
background-color: #cccccc;
border: 1px solid #000000;
padding: 1px;
font-family: "courier new", helvetica, "times new roman", serif;
font-size: x-small;
width: 99%;
margin: 1px auto 1px auto;
white-space: nowrap;
overflow: auto;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
color: #000000;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: x-small;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help
{
cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
width: 96%;
}

/* Highlighted text - such as search results;). */
.highlight
{
background-color: yellow;
font-weight: bold;
color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
color: #000000;
background-color: #E1E1E1;
}
.windowbg2
{
color: #000000;
background-color: #F0F0F0;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here;). */
.signature
{
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg td, .titlebg a:link, .titlebg a:visited
{
color: white;
font-style: normal;
background-color: #6B8EAE;
}
.titlebg a:hover
{
color: #dfdfdf;
}

/* This is used for categories, page indexes, and several other areas in the forum. */
.catbg
{
background-image: url(images/catbg.jpg);
}

/* This is used for a category that has new posts in it... to make it light up. */
.catbg2
{
background-image: url(images/catbg2.jpg);
}

.catbg, .catbg2
{
font-weight: bold;
background-color: silver;
color: #000000;
}

/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
background-color: #828181;
}

/* This is used on tables that should just have a border around them. */
.tborder
{
border: 1px solid #828181;
background-color: #FFFFFF;
padding: 2px;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
font-size: x-small;
font-family: Tahoma, arial, helvetica, serif;
}
.normaltext
{
font-size: small;
}
.largetext
{
font-size: large;
}

/* This is the white header area where the title, menu bars, and header boxes are. */
#headerarea
{
background-color: white;
border-bottom: 1px solid gray;
}
/* This is the main area of the forum, the part that's gray. */
#bodyarea
{
background-color: #D4D4D4;
}
/* And this is the bottom, where the copyright is, etc. */
#footerarea
{
color: black;
background-color: white;
border-top: 1px solid gray;
}

/* This is for the special header boxes on the top (user info, key stats, news box.) */
.headertitles
{
background-color: #6B8EAE;
border: 1px solid #6B8EAE;
}
.headerbodies
{
border: 1px solid #7A7777;
background-color: #EFEFEF;
background-repeat: repeat-x;
background-position: bottom;
}


and
* {
margin: 0;
padding: 0;
}

html, body {
height: 100%;
}

body {
font-family: Geneva, Arial, Helvetica, sans-serif;
}

/* -------------------------------------------------------------------------- */

#container {
width: 750px;
margin: 0 auto;
min-height: 100%;
background: url(images/containerbg.gif);
padding-bottom: 50px;
border-left: 5px solid #5D5D5D;
border-right: 5px solid #5D5D5D;
}

/* -------------------------------------------------------------------------- */

.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.clearfix {
display: inline;


* html .clearfix {height: 1%;}
.clearfix {display: block;}

/* -------------------------------------------------------------------------- */
#right {
font-size:12px;
color: #999;
}
#right a:link {
font-size:12px;
color: #999;
}
#right a:visited {
font-size:12px;
color: #999;
}
#nav {
width: 213px;
float: left;
}

h4 {
font-size: 12px;
height: 18px;
color: #FFF;
padding: 3px 0 0 10px;
}

#nav ul {
list-style-type: none;
margin-bottom: 15px;
}

#nav a {
display: block;
font-size: 10px;
font-weight: bold;
color: #999;
text-decoration: none;
margin: 0 4px auto 4px;
padding-left: 5px;
border-bottom: 1px solid #CCC;
height: 12px;
padding-top: 7px;
}

#nav a:hover {
background: #F5F5F5;
}

#ad a {
width: 200px;
margin: 5px auto;
padding: 0;
border-bottom : 0;
height: 400px;
}

/* -------------------------------------------------------------------------- */

#login input {
border: 1px solid #CCC;
font-size: 14px;
font-weight: bold;
font-style: italic;
color: #CCC;
width: 200px;
margin: 3px 6px;
text-align: center;
}

#login input#submit {
font-style: normal;
color: #999;
}

#login input#uname:focus, input#pword:focus {
border: 1px solid #999;
font-style: normal;
color: #999;
}

#login fieldset {
border: 0;
}

#login legend {
display: none;
}

#login label {
display: none;
}

/* -------------------------------------------------------------------------- */

#rightside {
float: right;
width: 532px;
}
#rightside a:link {
float: right;
width: 532px;
font-size: 12px;
}
/* -------------------------------------------------------------------------- */

h1 {
height: 93px;
text-indent: -9999px;
border-bottom: 1px solid #666;
}

/* -------------------------------------------------------------------------- */

#colourchange {
height: 31px;
background: url(images/colourchangebg.gif);
text-align: right;
}

#colourchange ul {
list-style-type: none;
margin-right: 15px;
float: right;
margin-top: 5px;
}

#colourchange li {
margin-right: 5px;
width: 20px;
height: 20px;
float: left;
}

#colourchange img {
border: 0;
}

#colourchange img:hover {
border: #FFF;
}

/* -------------------------------------------------------------------------- */

h2 {
background: url(images/contenthead.gif);
height: 14px;
font-size: 12px;
border-top: 5px solid #5D5D5D;
padding: 3px 0 3px 10px;
color: #666;
}

/* -------------------------------------------------------------------------- */

h3 {
font-size: 16px;
color: #666;
margin: 15px 7px;
border-bottom: 1px solid #999;
}

#rightside p, a {
font-size: 12px;
color: #999;
text-decoration: none;
margin-left: 20px;
margin-right: 10px;
}

#colourchange a {
margin-left: 0;
}

#rightside a {
margin: 0;
}

/* -------------------------------------------------------------------------- */

#footer {
background: url(images/footer.gif);
width: 750px;
margin: 0 auto;
height: 25px;
margin-top: -25px;
text-align: right;
border-left: 5px solid #5D5D5D;
border-right: 5px solid #5D5D5D;
}

#footer p, a {
font-size: 10px;
color: #666;
margin-right: 100px;
padding-top: 4px;
}

#footer a {
margin: 0;
}


...it should not clash in any way.

Advertisement: