External Style Sheet, background-image attribute

J

John Seeliger

I am trying to make a page that has a green margin on the left where I will
ultimately place my navigation bar, and is white elsewhere. I am trying to
use an external style sheet. The page I am trying to get it to work on is
www.desototexasusa.com , but I can't seem to get it to recognize the
external style sheet at all. I have another page that is closer to what I
am trying to do, except it has the style elements within the page itself:
www.desototexasusa.com/index2.html .

What am I doing wrong on the index.html page that it won't recognize the
style sheet at all, and what am I don't wrong on both of them that the
background won't show up? the index2 page works with the local copy I have
on my PC when I use:

body {background-image: url("images/green%20white.jpg"); margin-left: 25%;
margin-right: 10%;}

but it won't work on the uploaded version, either with the
images/green%20white.jpg or the full URL.

Thanks,
-John
 
E

Els

John said:
I am trying to make a page that has a green margin on the
left where I will ultimately place my navigation bar, and
is white elsewhere. I am trying to use an external style
sheet. The page I am trying to get it to work on is
www.desototexasusa.com , but I can't seem to get it to
recognize the external style sheet at all.

Your stylesheet:

<style type="text/css">
body {background-image: url("images/green white.jpg"); margin-
left: 25%; margin-right: 10%;}
h1 { margin-left: -8%;}
h2,h3,h4,h5,h6 { margin-left: -4%; }
</style>

Take out the html element:
<style type="text/css">
</style>
shouldn't be in the stylesheet.
 
J

John Seeliger

Els said:
Your stylesheet:

<style type="text/css">
body {background-image: url("images/green white.jpg"); margin-
left: 25%; margin-right: 10%;}
h1 { margin-left: -8%;}
h2,h3,h4,h5,h6 { margin-left: -4%; }
</style>

Take out the html element:
<style type="text/css">
</style>
shouldn't be in the stylesheet.

OK, thanks. That solved the first problem. Now just need to figure out the
background-image one.

-John
 
B

Barbara de Zoete

Could well have to do with having spaces in the image file name.

and with the "". I think those are supposed to work, but I seem to always
run in to trouble if I use "" for the url for a background-image in a CSS
stylesheet. I use '' or nothing. Both work fine for me.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 
J

John Seeliger

Els said:
Could well have to do with having spaces in the image file name.

I figured it out. Windows is not case sensitive and Unix is, so the
filename is actually images/green white.JPG .

Thanks for the help.

-John
 
E

Els

Barbara said:
and with the "". I think those are supposed to work, but I
seem to always run in to trouble if I use "" for the url
for a background-image in a CSS stylesheet. I use '' or
nothing. Both work fine for me.

I'm worse: I can't remember any of the " and ' rules, in the
@import for stylesheets the same, so I don't use them anywhere
<g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top