![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| 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: * 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 |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
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;
}
|
|
|
|
| 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 |
|
|
#2 (permalink) |
|
Manager Emeritus
|
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
|
|
|
|
|
|
#3 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
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." |
|
|
|
|
|
#5 (permalink) |
|
Registered User
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!
|
|
|
|
|
|
#6 (permalink) |
|
Registered User
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;
}
|
|
|
|
|
|
#7 (permalink) |
|
Manager Emeritus
|
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. |
|
|
|
|
|
#8 (permalink) | |
|
Manager Emeritus
|
Quote:
What you see is relatively what you get, on a good day.
__________________
mysql> --i-am-a-dummy
|
|
|
|
|
|
|
#9 (permalink) |
|
Registered User
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. |
|
|
|
|
|
#11 (permalink) |
|
Registered User
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...
|
|
|
|
|
|
#13 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
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." |
|
|
|
|
|
#14 (permalink) |
|
Registered User
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! |
|
|
|
|
|
#15 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
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." |
|
|
|
|
|
#16 (permalink) |
|
Registered User
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.) |
|
|
|
|
|
#17 (permalink) | |
|
Registered User
Join Date: Jul 2006
Posts: 27
OS: XP
|
Quote:
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;
}
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> 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> 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 for the white lines visible in Firefox...
|
|
|
|
|
![]() |
| Thread Tools | |
|
|