Jump to content

My CSS will not work?


Stalingrad

Recommended Posts

Hey guys! I've been having a huge problem with CSS. I've tried every way possible. It doesn't even take the CSS coding, I think. Here is the EXACT coding in style.css:

banner{
font-size: 30px;
font-color: black
;font-family: verdana; }

top{
font-size: 8px;
font-color: red;
font-family: verdana; }

body{
font-size: 14px;
font-color: blue;
font-family: verdana; }

 

Ok I am using this with the index.php for now, just to get things to work, then I will use it for the whole site. Here is index.php:

<?php
session_start();
include("config.php");
?>
<html><head><title> Hello World </title>
<link href="style.css" rel="stylesheet" type="text/css"></head><body>
<?php
echo "<td class=\"banner\">Welcome!!</banner><br><br><td class=\"top\">Testing this!</top><br><br><td class=\"body\">Testing this again!!</body>";?>
</body></html>

 

 

Now, I will show you the config file:

<?php
session_start();
include("style.css");
$con = mysql_connect("localhost","username","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("rockefel_db", $con);


$showusername = $_SESSION['username'];

$usergetquery = mysql_query("SELECT * FROM users WHERE username = '$showusername'");
while($ur = mysql_fetch_array($usergetquery)) {
$suserid = $ur['userid'];
$susuername = $ur['username'];
$scredits = $ur['credits'];
$sname = $ur['name'];
$sage = $ur['age'];
$ssignedup = $ur['signedup'];
$slastseen = $ur['lastseen'];
$sposts = $ur['posts'];
$susertype = $ur['usertype'];
$susershop = $ur['usershop'];
$smainpet = $ur['mainpet'];
$savatarcount = $ur['avatarcount'];
$suseravatar = $ur['useravatar'];
$sbanned = $ur['banned'];
$suserlookup = $ur['userlookup'];
}
echo "<font face=verdana><font size=4><font color=black>This is a test... displaying...<br><br>$suserid<br>$scredits</font>";

?>

Okay. Can somebody please tell me how to fix this? thanks!

 

Link to comment
Share on other sites

Right off hand you don't have any closing table data tags in your echo statement.

 

Also put one of them there dot lookin things in front of that banner word. To make it look like this .banner

 

I don't have any idea what "top" is.

 

If your going to be using verdana in every div you just need to declare it in the body element.

Link to comment
Share on other sites

In life you have to work with what you got. Sorry I didn't see this earlier

 

When I mentioned body I didn't pay attention and see a class named body, anyway this works for me. I changed font size and color for a test

 


body {
font-family: verdana; 
}
.banner{font-size: 58px; color: #fff;}
.top{font-size: 18px; color: red; }
.body {font-size: 25px; color: green;}

 

Change font-color to color, font-color is old and not for css

Be sure to close your td's.

is the path to style.css correct?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.