00:00
00:00
Newgrounds Background Image Theme

Peacock6k just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

CSS Stylesheets!

1,955 Views | 34 Replies
New Topic Respond to this Topic

CSS Stylesheets! 2008-02-17 18:11:50


ARGH! I have made a stylesheet. That stylesheet was saved as a .css file. To make my entire site have that stlyesheet, I used the <link rel="stylesheet" type="text/css" href="blabla.css"> HTML tag. However, when using this, partial of my CSS code in the stylesheet and all the class somehow seem to be cut off. Example, border commands work fine, but background commands simple fail and are not seen. PHP include and require is simply unnecessary. Why is this happening?
Thank you.

Also, if you have noticed, my topic 'mood' is MAD. I am not longer sad. I am very, very confused and angry. Oh, yeah, thanks again.

Response to CSS Stylesheets! 2008-02-17 18:24:14


You probably forgot a ; or } somewhere in the stylesheet...


"My software never has bugs. It just develops random features. " - Unknown

[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]

BBS Signature

Response to CSS Stylesheets! 2008-02-17 18:30:16


Everything seems closed and stated.

Response to CSS Stylesheets! 2008-02-17 18:44:16


At 2/17/08 06:30 PM, Celtrum wrote: Everything seems closed and stated.

Always show your code so that we can see what you're doing wrong.

Response to CSS Stylesheets! 2008-02-17 18:46:27


Sorry, Jessi. Here is a simplified version of my code. The res thas been deleted due to this darn problem.

table td.head{
background-image: url('img/tt.jpg');
border: solid;
border-width: 1px;
font-family:kozuka gothic pro r;
border-color: #000000;
}
.supfont{
font-weight: 900;
}
.minfont{
font-family:arial;
font-size: 15;
}
a, a:visted{
text-decoration: none;
color: #000000;
}
a:hover{
color: #0000FF;
text-decoration: none;
}

input.tan{
border: solid;
border-width: 1px;
background-color: #FCEBC5;
}
p, div, span.a{
font-family: arial
}

Thank you.

Response to CSS Stylesheets! 2008-02-17 18:55:01


At 2/17/08 06:46 PM, Celtrum wrote:
p, div, span.a{
font-family: arial;
}

Fixed.


|| AK || Play TF2 @ AK's ||

NG Archive - The Problems of the Past, Today!

BBS Signature

Response to CSS Stylesheets! 2008-02-17 19:20:18


At 2/17/08 06:46 PM, Celtrum wrote: font-family:kozuka gothic pro r;

Use fonts that people actually have. Use a real "family" too, not just one font or else your site will default to a font that might make your site look like crap.

Response to CSS Stylesheets! 2008-02-17 19:42:14


Everything is still FAILING.

Response to CSS Stylesheets! 2008-02-17 19:58:21


How about a link to the site?

Response to CSS Stylesheets! 2008-02-17 20:23:33


I am just testing out my stylesheet for errors. And this is the error.

Response to CSS Stylesheets! 2008-02-17 20:36:28


What's the error?

lul?


BBS Signature

Response to CSS Stylesheets! 2008-02-17 20:44:59


At 2/17/08 08:23 PM, Celtrum wrote: I am just testing out my stylesheet for errors. And this is the error.

I tell everyone with problems like this to show us either the WHOLE code (HTML included) or link to a live version of the site because otherwise, we can't "see" what's going on if you're still having issues.

Response to CSS Stylesheets! 2008-02-17 20:56:47


Ok. Here is one of my test files:

<html>
<title>TEST</title>
<head>
<link rel="stylesheet" type="text/css" href="core/main.css" />
</head>
<body>
<table><tr><td class='head'>TEST</td></tr></table></body></html>

Response to CSS Stylesheets! 2008-02-18 02:42:10


At 2/17/08 08:56 PM, Celtrum wrote: Ok. Here is one of my test files:

In order for that to work you'd need to have a directory called "core/img".. If your img directory is on the same level as core then the browser won't find the file.. You could use "../img/tt.jpg" in the css file to fix this...
(or, if you do have img in core, you could try putting it in the directory above it to see if it's the other way around)

Also, it's legal to not use the semicolon if it's on the last command before the end-curlybrace.
And font-family entries that are more than one word need to be in quotes.

Your title tag needs to be inside the head.
You have no doctype.
All html elements need to use actual double quotes instead of single quotes to my knowledge.
I think that you're required to put a generic font-family(serif, sans-serif, ect) after the specific font but not sure.
The format for border: is border: width type color;. I'm pretty sure you need all three. So something like border: 1px solid black. It requires spaces between 1px and solid, and solid and black.
You can't just use 'a'; it needs to be 'a:link' or something like that.
Font-size needs a unit. It would 15pt?


...

BBS Signature

Response to CSS Stylesheets! 2008-02-18 04:39:10


At 2/17/08 06:55 PM, Aksumka wrote:
At 2/17/08 06:46 PM, Celtrum wrote:
p, div, span.a{
font-family: arial;
}

Fixed.

Actually no.

X     { display: inline; font-weight: bolder }

Taken from W3's website, where X would be an element, note no ending ; on the last value. You don't have to end with a colon before the }


BBS Signature

Response to CSS Stylesheets! 2008-02-18 04:42:10


At 2/18/08 02:42 AM, Sundersoft wrote: You can't just use 'a'; it needs to be 'a:link' or something like that.

No,

<a>

is a tag yes? So therefore whatever.a or a is a perfectly valid element in CSS.

Gaah so many people giving bad advice, I don't have time to go through everyone's post now I have to go out, but please refrain from positing or look it up if you're not 100% sure. Thanks.


BBS Signature

Response to CSS Stylesheets! 2008-02-18 07:32:55


At 2/18/08 04:42 AM, smulse wrote: is a tag yes? So therefore whatever.a or a is a perfectly valid element in CSS.

Here's the w3.org site: http://www.w3.org/TR/REC-CSS1#anchor-pse udo-classes

They use this example for anchors in css:

A:link { color: red } /* unvisited link */
A:visited { color: blue } /* visited links */
A:active { color: lime } /* active links */

I don't know if it's required.. (I can't find an example or anything without the :link though)


...

BBS Signature

Response to CSS Stylesheets! 2008-02-18 10:54:47


At 2/18/08 02:42 AM, Sundersoft wrote: The format for border: is border: width type color;. I'm pretty sure you need all three. So something like border: 1px solid black. It requires spaces between 1px and solid, and solid and black.

Nope, you can just have

border: 1px;

and the rest of the styles will either cascade or resort to the default browser styling. How ever for consistency and cross browser rendering it's advised to have use all three, but it is not a necessity.

Also white space in a stylesheet is ignored, you don't need spaces between anything, but it does look better if there are.

Font-size needs a unit. It would 15pt?

Fonts should ideally be sized in em.

At 2/18/08 07:32 AM, Sundersoft wrote: They use this example for anchors in css:
A:link { color: red } /* unvisited link */
A:visited { color: blue } /* visited links */
A:active { color: lime } /* active links */

Correct, but an anchor element doesn't have to be a link

<a>anchor</a>

There we have an anchor that's not a link, and so a:link isn't going to style it, but a is.

<a href="#">anchor link</a>

on the other had is an anchor with a link, and therefore is styled by a:link


BBS Signature

Response to CSS Stylesheets! 2008-02-18 10:56:52


I am getting so confused. I'll try all of your suggestions.

Response to CSS Stylesheets! 2008-02-18 11:13:08


At 2/18/08 02:42 AM, Sundersoft wrote:
At 2/17/08 08:56 PM, Celtrum wrote: Ok. Here is one of my test files:

In order for that to work you'd need to have a directory called "core/img".. If your img directory is on the same level as core then the browser won't find the file.. You could use "../img/tt.jpg" in the css.
YAYAYAY! You rock dude(I hate that word)! It was a simple managment of file locations! You rock!
Thank you to ALL you repeately posted to try and help me! YAY!

Response to CSS Stylesheets! 2008-02-18 12:21:11


I just like being happy, even if it is for the young!

Response to CSS Stylesheets! 2008-02-18 12:29:25


At 2/18/08 12:19 PM, polym wrote: how old are you?

Does it matter? Is you asking his age really contributing to the topic?


|| Portfolio || Facebook || Twitter ||

BBS Signature

Response to CSS Stylesheets! 2008-02-18 12:41:58


The topic is going to get locked. Plese stop future arguments.

Response to CSS Stylesheets! 2008-02-18 12:46:49


Simply use @import.

<style type="text/css" media="screen">@import 'core/main.css';</style>

Response to CSS Stylesheets! 2008-02-18 12:59:53


At 2/18/08 12:41 PM, Celtrum wrote: The topic is going to get locked. Plese stop future arguments.

It won't get locked until people start flaming.
But seriously yeah, Jessi is right, don't dreail the threads, if you guys want to chat each other up and asking how old each other are so you know if it's safe to go out do it over PMs.

At 2/18/08 12:46 PM, Relish wrote: Simply use @import.
<style type="text/css" media="screen">@import 'core/main.css';</style>

No, just no. Read the whole thread before you reply.


BBS Signature

Response to CSS Stylesheets! 2008-02-18 13:01:08


At 2/18/08 12:59 PM, smulse wrote: Jessi is right

LOL apologies Danny, do you have the same level icon or something? D:


BBS Signature

Response to CSS Stylesheets! 2008-02-18 13:30:42


At 2/18/08 12:59 PM, smulse wrote: No, just no. Read the whole thread before you reply.

I agree, especially because he replies all the time without reading the whole topic first. It's usually something that's already been answered.

Response to CSS Stylesheets! 2008-02-18 13:47:02


At 2/18/08 01:30 PM, Jessii wrote:
At 2/18/08 12:59 PM, smulse wrote: No, just no. Read the whole thread before you reply.
I agree, especially because he replies all the time without reading the whole topic first. It's usually something that's already been answered.

It wasn't even the solution either :|


BBS Signature

Response to CSS Stylesheets! 2008-02-18 14:02:42


At 2/18/08 01:47 PM, smulse wrote: It wasn't even the solution either :|

Not even close! It was a directory problem :/

Response to CSS Stylesheets! 2008-02-18 19:25:42


At 2/17/08 08:56 PM, Celtrum wrote:
<td class='head'>TEST</td>

<td class="head">TEST</td>

will the use of double quotations marks instead of single fix it? im new at this html and css stuff too


Watch James Bond's Facility Adventure!

BBS Signature