473,326 Members | 2,048 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,326 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 1298
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.