Using background image from same directory?

M

Michael Fesser

..oO(Jeff Wisnia)
I have this line right after </head> on a web page:

<body style="background-color: rgb(255, 255, 255); background-image:
url(http://home.comcast.net/~myname27/ltblupap.jpg);">

The image (ltblupap.jpg) is located in the same server directory as the
page it is in.

How do I change the code so it doesn't need all that referencing to that
http://home.....thing?

<body style="background: #FFF url(ltblupap.jpg)">

But you should use an external stylesheet.

Micha
 
W

William Hughes

I have this line right after </head> on a web page:

<body style="background-color: rgb(255, 255, 255); background-image:
url(http://home.comcast.net/~myname27/ltblupap.jpg);">

The image (ltblupap.jpg) is located in the same server directory as the
page it is in.

How do I change the code so it doesn't need all that referencing to that
http://home.....thing?

Thanks guys,

Jeff

If I'm not mistaken, just put in the filename. Also, if I'm reading
your style correctly, you want the default color to be white:

<body style="background: white url (ltblupap.jpg)">

That should work...
 
D

dorayme

Michael Fesser said:
.oO(Jeff Wisnia)


<body style="background: #FFF url(ltblupap.jpg)">

But you should use an external stylesheet.

Micha

What if this is his only style?
 
D

dorayme

William Hughes said:
If I have a style that is only used on one page of my website, I place
it in the code for that page.

Example: http://home.grandecom.net/~cvproj/spec-space.htm

I use my external stylesheet
(http://home.grandecom.net/~cvproj/cvproj.css) for styles that are
used all over my site.

It is certainly a sensible strategy to place whatever might be
different for only one page in the head of that html doc and this
is better than placing it in the body at various points.

(btw, Bill, your header is badly "cut-off" by the text-size I
tend to use by afternoon (when I am getting tired). I have not
looked at your markup or css but may I suggest you either use an
em based dim and/or else be more generous in the dim that
controls the banner bottom margin or the top margin of what is
under etc...

I noticed because I get uncomfortable when I see earthlings
shooting off into space, they might get to see my humble origins.
Look, it's not exactly that I am ashamed or anything... just... I
dunno... it's sort of private...)
 
J

John Hosking

dorayme said:
(btw, Bill, your header is badly "cut-off" by the text-size I
tend to use by afternoon (when I am getting tired). I have not
looked at your markup or css but may I suggest you either use an
em based dim and/or else be more generous in the dim that
controls the banner bottom margin or the top margin of what is
under etc...
His header is cut off because he's specifying an iframe for it, and the
iframe has height=70 (by which he presumably means 70px). The height
specification has no relationship to the font size.

I don't have to wait until I'm tired and have boosted my font size; as
soon as I size my viewport narrower than about 1248px, the header
breaks. And I almost never have my viewport that wide; that's almost
full-screen.
 
W

William Hughes

His header is cut off because he's specifying an iframe for it, and the
iframe has height=70 (by which he presumably means 70px). The height
specification has no relationship to the font size.

I don't have to wait until I'm tired and have boosted my font size; as
soon as I size my viewport narrower than about 1248px, the header
breaks. And I almost never have my viewport that wide; that's almost
full-screen.

Unfortunately, GrandeCom does not enable SSI in personal webspace, so
I have to use IFRAME.

Anybody know a way to dynamically resize an IFRAME? Or another way to
do the same thing?
 
D

dorayme

William Hughes said:
Unfortunately, GrandeCom does not enable SSI in personal webspace, so
I have to use IFRAME.

Anybody know a way to dynamically resize an IFRAME? Or another way to
do the same thing?

There are various things you could do:

(1) put in a height:

/* IFRAME defaults */

iframe {width: 100%; border: 0; height: 12em;}

just about gets it.

(2) improve the situation by not having the heading words "The
Carrier Project" wrap in this design (need help on this?) and
then being able to settle on a smaller em size for height (a
"good thing" because it is not good taking up too much height
space for non content stuff
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top