Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-12-2007, 06:40 PM   #1
Member (10 bit)
 
faint545's Avatar
 
Join Date: Mar 2006
Location: Maryland
Posts: 550
CSS Newbie...

I'm creating this web site and I've always been excellent with HTML, but not so much with CSS. Now, i've created a simple CSS file containing...

Quote:
body {font-family: Trebuchet MS; font-size: 10px; color: #FFFFFF;}
Now, im like 95% positive that all of the syntax or w/e is all correct. But when I go to link it with my "index.html" file nothing works...

HTML Code:
<link rel="stylesheet" type="css/text" href="stylesheet/default.css">
That's how I linked it... I don't see anything wrong... [i dunno why but the backslashes were added in..]

ALSO...

How do I get the stylesheet attributes to apply inside tables?
__________________
Kerberos2:
Corsair Obsidian 700D
ASUS M4A89TD
Radeon HD 5850
A-DATA 8GB DDR3 1333
AMD Phenom II x6 1055T @ 2.8GHz w/ Corsair H50
Corsair 850HX PSU
WD Blue 160GB 7200 RPM SATA HDD
WD Black 640GB 7200 RPM SATA HDD
ASUS DVD/CD Drive

Last edited by faint545; 09-12-2007 at 06:53 PM.
faint545 is offline   Reply With Quote
Old 09-12-2007, 07:50 PM   #2
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Assuming that you have the path correct that should work okay. You can check that by doing an inline stylesheet (between style tags in your head section.

That will work in tables unless you create another class or id that overrides it like so
td{font-family: Trebuchet MS; font-size: 10px; color: #000000;}
or
td.blackfont{font-family: Trebuchet MS; font-size: 10px; color: #000000;}
<td class="blackfont">Some text here</td>

Bookmark A List Apart as one of the best sites for CSS.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 09-12-2007, 09:40 PM   #3
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
If this is plain HTML take out the escape characters and just use the quotations.

I just did a test with a link and using the escape characters screws up the URL. Your browser reading the HTML won't read the \ as an escape character - it looks like it's handling it as part of the URL and making the link something goofy like \http://www.somesite.com/\ ... Probably why your stylesheet link isn't working. Now...if you are echoing this from PHP, than there shouldn't be a problem. If this is being printed dynamically from PHP take a look at the source code provided from your browser and make sure the link doesn't look bonkers.
__________________
"It is the way of man to make monsters and it is the nature of monsters to destroy their makers."
blue60007 is offline   Reply With Quote
Old 09-12-2007, 10:50 PM   #4
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Quote:
Originally Posted by blue60007
If this is plain HTML take out the escape characters and just use the quotations.

I just did a test with a link and using the escape characters screws up the URL. Your browser reading the HTML won't read the \ as an escape character - it looks like it's handling it as part of the URL and making the link something goofy like \http://www.somesite.com/\ ... Probably why your stylesheet link isn't working. Now...if you are echoing this from PHP, than there shouldn't be a problem. If this is being printed dynamically from PHP take a look at the source code provided from your browser and make sure the link doesn't look bonkers.
I think he meant that the quotes were escaped when you use the HTML tags here. I assume that they weren't escaped on his site.
mairving is offline   Reply With Quote
Old 09-12-2007, 11:14 PM   #5
Member (10 bit)
 
faint545's Avatar
 
Join Date: Mar 2006
Location: Maryland
Posts: 550
yeah the escape characters were added in after i posted the topic.. the things messed it up.. but i figured it out.. as i found out... where i had.. <...type="css/text"...> it should if been <...type="text/css"...> not sure why it's picky but after i switched it, it worked just fine.
faint545 is offline   Reply With Quote
Old 09-12-2007, 11:36 PM   #6
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
Ahh...I see. Probably how the forum stores them in the database. Glad you found the problem though, it's always those little annoying mistakes.
blue60007 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how best to convert my HTML pages to CSS? usanyou Web Design / Development 1 01-27-2007 11:51 AM
CSS Stylesheet Linking Problem Nav_functions Web Design / Development 6 02-17-2006 09:17 PM
Yet another CSS problem (#3) mysterio2099 Web Design / Development 19 08-10-2005 01:54 PM
Fresh start with CSS Force Flow Web Design / Development 4 07-23-2003 10:37 AM
Xml And Css Help Colb Web Design / Development 2 05-05-2003 05:17 PM


All times are GMT -5. The time now is 07:32 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2