CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2004, 01:48 PM
th8four th8four is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: north west UK
Posts: 18 th8four User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
background

whats wrong with this?

body
{
font-family:arial;
font-color:#000000;
background:url(background/bg.jpg);
}

its the background bit that isnt working
it works when the css is included on the page but when i put it on a seperate stylesheet it hasnt worked

Reply With Quote
  #2  
Old July 26th, 2004, 02:06 PM
th8four th8four is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: north west UK
Posts: 18 th8four User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i also tried background-image

Reply With Quote
  #3  
Old July 26th, 2004, 02:25 PM
jnsg jnsg is offline
JackOfAllTrades, MasterOfNone
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kentucky, USA
Posts: 374 jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level)jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level)jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level)jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level)jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level)jnsg User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 5 h 20 m 19 sec
Reputation Power: 54
Send a message via AIM to jnsg
There is no font-color property in CSS. Use color. As for your background, you must use quotes in a URL like so: background: url("background/bg.jpg");

Reply With Quote
  #4  
Old July 26th, 2004, 02:36 PM
th8four th8four is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: north west UK
Posts: 18 th8four User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
its still not worked....this is the 1st time ive tried using a stylesheet

heres what i have on my page
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> </title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="sinergy.css">

</head>
<body> <div align="center">
<table cellpadding="0" cellspacing="0">
  <tr> 
    <td height="100" colspan="3" style="background: url('background/logo-mergew.jpg');"></td>
  </tr>
  <tr> 
    <td width="100" height="15" style="background: url('background/row_divider.jpg');"></td>
    <td width="15" height="15" style="background: url('background/join.jpg');">&nbsp;</td>
    <td width="541" height="15" style="background: url('background/row_divider.jpg');">&nbsp;</td>
  </tr>
  <tr> 
    <td width="100" height="285" valign="top" style="background: url('background/left.jpg');"> 
      <div align="center"> <a href="index.html">Home</a> <br />
        <a href="news.php">News</a> <br />
        <a href="templates.html">Templates</a> <br />
        <a href="graphics.html">Graphics</a> <br />
        <a href="scripts.html">Scripts</a> <br />
        <a href="contact.html">Contact </a><br/>
      </div></td>
    <td width="15" style="background: url('background/column_divider.jpg');"></td>
    <td valign="top" bgcolor="#BCD2FE"> 



<p>Here is a list of links to sites i think may be useful </td>
  </tr>
</table>
 <br />
  
  <br />
  <a href="map.html">Site Map</a> .:. <a href="tou.html">Terms</a>
<h1>Animations Images backgrounds free web Graphics <br />
    webpage Templates website Scripts</h1>

</div>
</body>
</html>



and heres what i have on my stylesheet...
Code:
 .sinergy 
	
body
{
	font-family:arial;
	font-color:#000000;
	background: url("background/bg.jpg");
}

table
{
	border:none;
	width: 650px;
	font-family: Arial, Helvetica, verdana;
}

a:link
{
	color:#ffffff;
	text-decoration:none;
	font-weight: bold;
}

a:visited
{
	color:#ffffff;
	text-decoration:none;
	font-weight: bold;
}

a:hover
{
	color:#ffffff;
	text-decoration:none;
	font-weight: bold;
	background-color:#4E5CDE;
}

h1 { 
  font-weight: bold;
  color: #0099cc; 
  font-size: 12pt;
  line-height: 14pt; 
  font-family: helvetica; 
  font-variant: normal;
  font-style: normal;
}


can you see anything wrong with that? other than the font-color ?

Reply With Quote
  #5  
Old July 26th, 2004, 02:37 PM
TheJim01's Avatar
TheJim01 TheJim01 is offline
Coconuts migrate?
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: http://middle.nowhere.com
Posts: 1,895 TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate Folder
Time spent in forums: 2 Weeks 5 Days 11 h 8 m 20 sec
Reputation Power: 1176
Actually, you don't NEED the quotes, it's just good form. The url inside is relative though, so if you have your css in a different folder than your html, you'll be referencing the wrong place. Make sure that bg.jpg is in the folder "background," and that the "background" folder is in the same directory as your css. A good way to do this is to place all your html and css in the same--I use the main--directory, and build all subdirectories from there.

Hope that helps.

-- edit --

after looking at your code, I see the problem:
Code:
.sinergy

is floating off by itsself. This is an empty CSS class, and should have { and } after it:
Code:
.sinergy{}


That should make your page render correctly.
__________________

Proud member of the T.S.N.B.U.F.L (tables should not be used for layout) alliance.

"Only use elements for their intended purpose. You wouldn't try to make coffee with a telephone, would you?" -Me

Last edited by TheJim01 : July 26th, 2004 at 02:39 PM.

Reply With Quote
  #6  
Old July 26th, 2004, 02:39 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Quote:
you must use quotes in a URL like so: background: url("background/bg.jpg");
That's not quite true. Quotes are required only if there are spaces in the url.

Check the external file for html tags and html comments. These are no-nos, and are common gotchas.

[edit]Looks like Jim called the shot while I was refilling the mug and typing.[/edit]

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Last edited by kk5st : July 26th, 2004 at 02:45 PM.

Reply With Quote
  #7  
Old July 26th, 2004, 02:42 PM
th8four th8four is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: north west UK
Posts: 18 th8four User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thejim, the () sorted it out,
thanks for that

Reply With Quote
  #8  
Old July 26th, 2004, 03:37 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,715 Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 17 h 42 m 44 sec
Reputation Power: 642
Quote:
Originally Posted by kk5st
[edit]Looks like Jim called the shot while I was refilling the mug and typing.[/edit]


yeah, he beat me too,
so i didn't post my reply

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > background


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT