Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-12-2006, 06:14 AM   #1
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
CSS Help

This stylesheet works when I have it directly on the webpage, however if I save it as a .css and link it some tags doesn't work, like the font-family body tag.
Any ideas why not?

Quote:
<style type="text/css">
body,td,th {font-size: 12px; color: #000000;}
body {margin-top: 0px; background-color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; }
.topads {font-size: 16px; color: #FFFFFF; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
.whitebold {color: #FFFFFF; font-weight: bold; }
.blackbold {color: #000000; font-weight: bold; }
.smallheading {font-size: 16px; color: #000000; font-weight: bold; font-family: Arial, Helvetica, sans-serif; }
.normal {font-family: Verdana, Arial, Helvetica, sans-serif; }

a:link {
text-decoration: underline;
color: #0000FF;
}
a:visited {
text-decoration: underline;
color: #0000FF;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: underline;
}
</style>
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:17 AM   #2
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
Not sure, but try using the 'font' tag to specify the font...

font:bold 10pt verdana; for example...

Make sure you don't have style tags overwriting your classes
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:18 AM   #3
Jakke PNG
ex-TeenGodFather
 
Jakke PNG's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: Suomi Finland Perkele
Posts: 20,306
You need to remove the <style type="text/css"> line and
</style>
Then you need to link to that stylesheet from the page you want to use it on, like so:
<link rel="STYLESHEET" href="style/default.css" type="text/css">
__________________
..and I'm off.
Jakke PNG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:25 AM   #4
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Quote:
Originally Posted by TeenGodFather
You need to remove the <style type="text/css"> line and
</style>
Then you need to link to that stylesheet from the page you want to use it on, like so:
<link rel="STYLESHEET" href="style/default.css" type="text/css">
Thats what I did, but somehow the tags wont work with me.
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:30 AM   #5
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Quote:
Originally Posted by Donners
Thats what I did, but somehow the tags wont work with me.
Try a different approach...

Code:
<style type="text/css" media="screen">
	@import url("style.css");
</style>
style.css being your file name of course if its outside that directory you will need the full path.

Also, to make your code cleaner you check out the short hand of FONT:
http://www.w3schools.com/css/css_font.asp
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:33 AM   #6
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Hmm, just checked my page in IE and now it works, looks like a firefox issue.
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:45 AM   #7
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Tested in Firefox & IE

style.css
Code:
  body {
    margin-top:0;
    padding-top:0; /* Opera */
    background-color:#000;
  }

  body, td, th {
    font:normal 12px/14px Verdana, Arial, Helvetica, sans-serif;
  }

  a {
    text-decoration:underline;
    color: #0000ff;
  }

  a:hover {
    text-decoration: none;
  }

  /* Classes */
  .topads {
    font:normal normal bold 16px/18px Verdana, Arial, Helvetica, sans-serif;
    color:#fff;
  }

  .whitebold {
    color:#fff;
    font-weight:bold;
  }

  .blackbold {
    color:#000;
    font-weight:bold;
  }

  .smallheading {
    font:normal normal bold 16px/18px Verdana, Arial, Helvetica, sans-serif;
    color:#000;
  }

  .normal {
    font:normal 12px/14px Verdana, Arial, Helvetica, sans-serif;
  }
page.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
	@import url("style.css");
</style>
</head>

<body>

  Code here

</body>
</html>
I cleaned up your CSS using short-hand and added zero padding so the top would look right in opera.
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:50 AM   #8
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Still now getting it to work on my page

Care to hit me up on ICQ?
21-956-857
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 06:59 AM   #9
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
fallenmuffin's code worked great!! The guy saved my day
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 07:16 AM   #10
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Quote:
Originally Posted by Donners
fallenmuffin's code worked great!! The guy saved my day
w00t 5 6 7 8
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-12-2006, 07:26 AM   #11
ssp
Confirmed User
 
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
Next time read a manual before blaming your problem on browsers.
ssp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.