Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 10-16-2006, 04:12 AM   #1 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


CSS Problem

Hi, Gang!

Can somebody examine this CSS code and tell me why my background image is not displaying?

Code:
BODY { font-family: Verdana, Arial, Sans-serif;
	font-size:medium;
	font-weight:normal;
	font-style:normal;
	text-decoration:none;
	font-variant:normal;
	color: #00FFFF;
	
	background: #000000;
	background-image: stars2.gif;
	}
Thanks a lot, folks!
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 10-16-2006, 09:44 AM   #2 (permalink)
Manager Emeritus
 
v-six's Avatar
 
Join Date: Sep 2004
Location: Gardiner, NY
Posts: 2,076
OS: OS X for mac, XP Pro for PC


Send a message via AIM to v-six
what were you intending with the
background: #000000;

If you want to set a background color in case the image doesnt load, use
background-color: #000000;
if your background is supposed to repeat, add this line:
background-repeat: repeat;
__________________
mysql> --i-am-a-dummy

v-six is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-16-2006, 04:37 PM   #3 (permalink)
Design Team
 
DJ-Zep's Avatar
 
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)

My System

Replace
background-image: stars2.gif;

with

background-image: url(stars2.gif);
__________________
Nice music blog

Nvu || Notepad++ || Apache || PHP || Keep TSF Alive

"The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier."
DJ-Zep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-16-2006, 10:21 PM   #4 (permalink)
Manager Emeritus
 
v-six's Avatar
 
Join Date: Sep 2004
Location: Gardiner, NY
Posts: 2,076
OS: OS X for mac, XP Pro for PC


Send a message via AIM to v-six
Quote:
Originally Posted by DJ-Zep View Post
Replace
background-image: stars2.gif;

with

background-image: url(stars2.gif);
well yeah, that too That was the so-close-to-my-face that I missed it part
__________________
mysql> --i-am-a-dummy

v-six is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-17-2006, 12:46 AM   #5 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


Interesting...

Apparently, the CSS Wizard in the web development package I have failed to insert the proper commands to do the job. I'll have to have words with the author.

However, about the URL thing... at the moment, I don't have a URL. All the files are sitting in a directory on my hard drive. How do I get around that?

And, finally, thank you both for sharing your knowledge. It is appreciated immensely!

Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-17-2006, 06:52 AM   #6 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


Here is the most recent attempt to get this dog to hunt...

Code:
BODY { font-family: Verdana, Arial, Sans-serif;
	font-size:medium;
	font-weight:normal;
	font-style:normal;
	text-decoration:none;
	font-variant:normal;
	color: #00FFFF;
	
	background-color: #000000;
	background-image: "C:\Documents and Settings\Dale Ward\My Documents\Personal Website Files\Logbook Files\stars2.gif";
	background-repeat: repeat;
	}
Needless to say, it ain't workin'. I've tried 4 different ways to put that pathname in there. I suppose I could just put the background image in each page, but... darn it... I shouldn't have to!
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-17-2006, 12:20 PM   #7 (permalink)
Manager Emeritus
 
v-six's Avatar
 
Join Date: Sep 2004
Location: Gardiner, NY
Posts: 2,076
OS: OS X for mac, XP Pro for PC


Send a message via AIM to v-six
Hmm.

You don't need the page uploaded to use the background-image: url(stars2.gif); code. Did you try it? Basically that tag will insert the root folder of the page that's being loaded before whatever location you add, regardless of where it is being stored.

Here's an example from a page I just put together:

background-position: center top;
background-image: url(../images/main_back.gif);
background-repeat: repeat;

It is organized in this way:
Main folder (containing all of my html and php files)
>Images folder (all jpgs and gifs)
>CSS folder (external css files)
>javascript folder (external javascript files)

I have a folder for my css files, and a folder for the images. The ".." in the URL instructs the browser to open the parent folder above my css files (the main folder), go to the images folder, then load main_back.gif If you are using seperate folders to store your files, you need to know this. Otherwise, ignore it.

Are you using any server-side scripting? It may help us to the the code for everything involved in the dysfunctional page, not just a piece of the css. Are you using this css inside the actual html files, or linking to it? Somewhere there's a gremlin in the code that we need to take care of.
__________________
mysql> --i-am-a-dummy


Last edited by v-six; 10-17-2006 at 12:26 PM.
v-six is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-17-2006, 12:28 PM   #8 (permalink)
Manager Emeritus
 
v-six's Avatar
 
Join Date: Sep 2004
Location: Gardiner, NY
Posts: 2,076
OS: OS X for mac, XP Pro for PC


Send a message via AIM to v-six
Quote:
Originally Posted by Dale Ward View Post
Interesting...

Apparently, the CSS Wizard in the web development package I have...
Hehehehe... one more thing you should know. Any kind of web design wizard is considered a WYSIWYG editor (the category that things like Dreamweaver, Frontpage, and NVU are put into). You need to be aware that they're actually called WYSIRWYGOAGD...

What you see is relatively what you get, on a good day.
__________________
mysql> --i-am-a-dummy

v-six is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-18-2006, 01:15 AM   #9 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


Alrighty, I finally got it to work after a friend on another forum explained the syntax to me. Here I was thinking that...

background-image: url()

meant to replace the url with the path or link to the file named inside the ().

It absolutely never occurred to me that the proper syntax was to actually insert the three letters URL into the tag!!

Someone spent a long... LONG... time writing syntax that confusing!

Anyway, as I said, it works now... and, as is typical with most projects, it highlighted yet another problem. I have a temporary site online that I need more help with.

The first thing that will leap out at you is the bloody irritating white lines that criss-cross the page (at least, they will if you view the page in Firefox... IE only displays the top frame, for reasons that I doubt even Bill Gates could explain).

Those lines used to be the borders of the frames I'm using, but I used the frameborder="0" and the noresize="noresize" tags in my frameset declarations. That was supposed to make the seams between the frames invisible... shows you how my day has been going.

So, my questions are twofold. How do I absolutely get rid of those lines... and how do I get all of the frames to display in IE?



<EDIT>
I think the IE problem may have something to do with the pathnames for the various frame files. I may need to put the full pathname... although, I currently have all the files in the same directory.
</EDIT>

Last edited by Dale Ward; 10-18-2006 at 01:20 AM.
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-18-2006, 10:39 AM   #10 (permalink)
Manager Emeritus
 
v-six's Avatar
 
Join Date: Sep 2004
Location: Gardiner, NY
Posts: 2,076
OS: OS X for mac, XP Pro for PC


Send a message via AIM to v-six
Dale, I haven't used frames in years, so I'll let one of the oldschool html guys jump on this. Check your private messages please.
__________________
mysql> --i-am-a-dummy

v-six is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-19-2006, 01:24 AM   #11 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


~grin~

It seems there have been at least two revisions to the HTML standard since the last time I tried to make a website. In fact, back then, there was no such thing as CSS.

So, basicly, I'm starting from scratch.

Lord help us all...
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-19-2006, 05:02 PM   #12 (permalink)
Tech, Design Team
 
devil lady's Avatar
 
Join Date: Sep 2005
Location: Tasmania, Australia
Posts: 962
OS: XP SP2

My System

Could you post the code for the whole page. i'm using IE so I can't see what you've got apart from the header.
devil lady is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-19-2006, 06:10 PM   #13 (permalink)
Design Team
 
DJ-Zep's Avatar
 
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)

My System

Hello Dale. Welcome to TSF.

I'm currently reviewing your webpage and studying a little bit on frames. I should have a solution soon. Thank you for your cooperation.
__________________
Nice music blog

Nvu || Notepad++ || Apache || PHP || Keep TSF Alive

"The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier."
DJ-Zep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-19-2006, 07:01 PM   #14 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


I'd love to see your solution, DJ... if only for my own satisfaction.

However, since three people have seen my design and suggested that I go with CSS positioning and boxes using the <DIV> tag, I believe I'll go that route.

I'm still interested in why I can't get rid of those white lines in the frames version, but it has become a much lower priority now. I'm almost done with the new .CSS file, and I'll let everyone know when I've posted the results to the temp site.

Thanks for all the help so far, everyone! I really appreciate it!
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-19-2006, 07:38 PM   #15 (permalink)
Design Team
 
DJ-Zep's Avatar
 
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)

My System

I was going crazy trying to remove the big white borders!

I recommend using tables. However, divs are useful, too. If you would like me to continue with the frames, drop a reply. If you want me to assist you in making the site using tables or divs, drop a reply.
__________________
Nice music blog

Nvu || Notepad++ || Apache || PHP || Keep TSF Alive

"The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier."
DJ-Zep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-20-2006, 01:36 AM   #16 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


I could use a little explanation of the purposes of the properties float, clear, and overflow.

I'm not really sure why float and clear are necessary when you're supposed to have precise positioning, and I understand what overflow is for but I'm not sure what my options are (i.e. what comes after the colon.)
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-20-2006, 02:29 AM   #17 (permalink)
Registered User
 
Dale Ward's Avatar
 
Join Date: Jul 2006
Posts: 27
OS: XP


Quote:
Originally Posted by devil lady View Post
Could you post the code for the whole page. i'm using IE so I can't see what you've got apart from the header.
No problem, DL...

mystyle.css
Code:
BODY { font-family: Verdana, Arial, Sans-serif;
	font-size:medium;
	font-weight:normal;
	font-style:normal;
	text-decoration:none;
	font-variant:normal;
	color: #00FFFF;
	
	background-color: #000000;
	background-image: url(stars2.gif);
	background-repeat: repeat;
	}
index.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title> Logbook Of Chief Engineer Milo Mahoney </title>

<frameset rows="29%,64%,7%">

<frameset>
<frame name="banner" noresize="noresize" src="bannerframe.html" frameborder="0">
</frameset>

<frameset cols="20%,60%,20%">
<frame name="toc" noresize="noresize" src="tocframe.html" frameborder="0">
<frame name="active" noresize="noresize" src="activeframe.html" frameborder="0">
<frame name="rtmarg" noresize="noresize" src="rtmargframe.html" frameborder="0">
</frameset>

<frameset>
<frame name="footer" noresize="noresize" src="footerframe.html" frameborder="0">
</frameset>

</frameset>

</head>

<body>
</body>

</html>
bannerframe.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title> banner frame </title>
<link rel="stylesheet" type="text/css" href="mystyle.css">

</head>

<body>

<img src="newlogo.gif" width="576" height="144" border="0">

</body>

</html>
tocframe.html, activeframe.html, rtmargframe.html, and footerframe.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title> toc frame </title>
<link rel="stylesheet" type="text/css" href="mystyle.css">

</head>

<body>

</body>

</html>
As you can see, tocframe.html, activeframe.html, rtmargframe.html, and footerframe.html are empty... but they should all be displaying the background image, since that was defined for the <BODY> tag. I can think of no logical reason why IE would not be displaying them.

As for the white lines visible in Firefox...
Dale Ward is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:45 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85