473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

If CSS was a living thing i would decapitate it!

Death Slaught
1,137 1GB
Ok im new to CSS and i learned enough to do what i wanted till i tried it on the actual page but what im tryin to use CSS for is to change the color of my links to red and have an image repeated it works on when these are the scripts:


[PHP]body
{
background-image:
url("D:\WebSite\Pictures\grim3.jpg");
background-repeat:
repeat;
background-attachment:
fixed
}
p {color: red}[/PHP]

[HTML]<html>
<head>
<link rel="stylesheet"
type="text/css" href="D:\WebSite\ex1.css" />
</head>
</html>[/HTML]

its on a USB flash drive if that has anything to do with it but im not done with the site yet so im not putting it on my server. and this is the scripts that dont work.

[PHP]body
{
background-image:
url("D:\WebSite\Pictures\grim3.jpg");
background-repeat:
repeat;
background-attachment:
fixed
}
p {color: red}[/PHP]

[HTML]<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet"
type="text/css" href="D:\WebSite\ex1.css" />
<title>Title</title>
</head>
<body>
<font color="red">
<center>
</center>
<ul>
<li><a href="D:\WebSite\HomePage.html">Home</a></li>
<li><a href="D:\WebSite\MusicPage.html">Music</a></li>
<li><a href="D:\WebSite\GamesPage.html">Games</a></li>
<li><a href="D:\WebSite\PicturesPage.html">Pictures</a></li>
<li><a href="D:\WebSite\DownloadsPage.html">Downloads</a></li>
</ul>
<br />
<br />
<center>
Hello welcome to the site I hope you enjoy it!
</center>
</font>
</body>
</html>[/HTML]


all it does is display a white background with red links and text its really annoying any help would be greatly appreciated.


Thanks, Death Slaught
Aug 18 '07 #1
4 1300
drhowarddrfine
7,435 Expert 4TB
It works for me. Are you sure the image is where you say it is? Can you access that location using your browser?

In addition, you don't need to change it now but <font> and <center> do not exist in xhtml but, as we talked about in the other thread, you are serving it as html and it works there.
Aug 18 '07 #2
I hate CSS too but your major problem is that you're using absolute URLs that will only work on your own machine, and only for a brief time. Instead of using D:\BLaBlaBla\Image.jpg you might try simply images/image.jpg (if your images are placed in an images folder in the same place as your HTML file).

You're not going to be able to share that HTML the way you've written it. Also, avoid the backslash character. That has a special meaning. Use the forward slash instead.

Finally, links have their own color apart from the text color, so it's best to apply their own color separately. For example the following will have a nice effect. Note how I set the background to black so that even if you screw up the link to the image (which I assume is a dark and stormy picture), things still look alright:

Expand|Select|Wrap|Line Numbers
  1. body { background:black; url(images/grim3.jpg); }
  2. a { color:red; text-decoration:none; }
  3. a:hover { color:orange; text-decoration:underline; }
  4.  
Aug 19 '07 #3
Death Slaught
1,137 1GB
It works for me. Are you sure the image is where you say it is? Can you access that location using your browser?

In addition, you don't need to change it now but <font> and <center> do not exist in xhtml but, as we talked about in the other thread, you are serving it as html and it works there.
I found the problem my USB flash drive wasnt all the in lol and i know i dont need the center and font i had that was from before i did the CSS part so thanks.
Aug 20 '07 #4
Death Slaught
1,137 1GB
I hate CSS too but your major problem is that you're using absolute URLs that will only work on your own machine, and only for a brief time. Instead of using D:\BLaBlaBla\Image.jpg you might try simply images/image.jpg (if your images are placed in an images folder in the same place as your HTML file).

You're not going to be able to share that HTML the way you've written it. Also, avoid the backslash character. That has a special meaning. Use the forward slash instead.

Finally, links have their own color apart from the text color, so it's best to apply their own color separately. For example the following will have a nice effect. Note how I set the background to black so that even if you screw up the link to the image (which I assume is a dark and stormy picture), things still look alright:

Expand|Select|Wrap|Line Numbers
  1. body { background:black; url(images/grim3.jpg); }
  2. a { color:red; text-decoration:none; }
  3. a:hover { color:orange; text-decoration:underline; }
  4.  
thanks but i fixed it and by the time im done with the site i wont need to have a black background the pictures gona come up and its gona like it lol and no its not a stormy picture it is dark though its an awesome pic of the grim reaper amazing what clients ask for huh? o well thanks anyways!
Aug 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Frostillicus | last post by:
I recently decided to do a web page, and this time decided to get with the times and use CSS to its fullest potential... BUT, I am having great difficulty getting IE to do as it is told... Consider...
0
by: Nicol Nghia | last post by:
Dear All, Is there anyone of you is origin Vietnamese living in US or Europe or Japanese? We are looking for partners and friends for developing .NET controls, and for developing software...
20
AaronL
by: AaronL | last post by:
Hi everyone, I was just curious as to how many of you own your own business writing software on your own and if you do, what advice could you give to a person going into this type of thing? I'm...
15
by: Thomas Dybdahl Ahle | last post by:
Hi, When I do a small program like from subprocess import Popen popen = Popen() from time import sleep sleep(100) start it and kill it, the ping process lives on. Is there a way to ensure...
11
by: mase | last post by:
I've built a new ASP.NET web app with the CSLA framework. The site runs fine with a small number of users, but once there is any traffic the CPU spikes at 100%. I went through and made many updates...
1
by: KBTibbs | last post by:
My ASP.NET page generates some HTML, then sticks it into a hiddenfield so a javascript can access it and write it to a popup window. I had to disable validation for this page, as HTML inside a...
3
by: J. Cliff Dyer | last post by:
On Thu, 2008-05-08 at 12:00 -0700, Eric Hanchrow wrote: It's the same reason as this: 5 5 6 5 Python "variables" are just names that point at objects. When you
0
by: majorcolletmkvu | last post by:
living with a crack addict http://cracks.12w.net F R E E
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.