GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CSS Help (https://gfy.com/showthread.php?t=575121)

Donners 02-12-2006 06:14 AM

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>

Validus 02-12-2006 06:17 AM

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

Jakke PNG 02-12-2006 06:18 AM

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">

Donners 02-12-2006 06:25 AM

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.

fallenmuffin 02-12-2006 06:30 AM

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

Donners 02-12-2006 06:33 AM

Hmm, just checked my page in IE and now it works, looks like a firefox issue.

fallenmuffin 02-12-2006 06:45 AM

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.

Donners 02-12-2006 06:50 AM

Still now getting it to work on my page :(

Care to hit me up on ICQ?
21-956-857

Donners 02-12-2006 06:59 AM

fallenmuffin's code worked great!! The guy saved my day :)

fallenmuffin 02-12-2006 07:16 AM

Quote:

Originally Posted by Donners
fallenmuffin's code worked great!! The guy saved my day :)

w00t 5 6 7 8

ssp 02-12-2006 07:26 AM

Next time read a manual before blaming your problem on browsers.


All times are GMT -7. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123