images using css

W

Wombatwal

G'day all
I am starting a Family History web site.
I have a logo in the form of a small jpeg image.
How do I code that into my css page so it will appear on every page.
Thanks
 
W

Wombatwal

Thanks for the quick reply Ed.
I already have a background image, so I suppose you would call it a header,
it needs to be in the top left side of the page.
It is making more sense now.

Bruce
 
A

Andrew

G'day all
I am starting a Family History web site.
I have a logo in the form of a small jpeg image.
How do I code that into my css page so it will appear on every page.
Thanks

Hi Bruce,

I see someone has already helped you with the logo. Just a little
[OT] welcome to the Family History web site world! I have been doing
my father's site for several years now: see the signature file.

All the best,

Andrew.
 
W

Wombatwal

Thanks Andrew.
I have not got my head around the basics of CSS as yet.
I still cannot work out how to code my external style sheet to put this
image on every page.
Ed asked if I was using it as a header, footer, link etc, I do not really
know.
Maybe a link, but I do know I need the image on every page.
It has me stumped, I have a book on HTML and style sheets plus I am looking
on the internet, I am lost.
Bruce

Andrew said:
G'day all
I am starting a Family History web site.
I have a logo in the form of a small jpeg image.
How do I code that into my css page so it will appear on every page.
Thanks

Hi Bruce,

I see someone has already helped you with the logo. Just a little
[OT] welcome to the Family History web site world! I have been doing
my father's site for several years now: see the signature file.

All the best,

Andrew.
 
W

Wombatwal

I have solved the problem, it may not be elegant, but, I have added a logo
to the background image. The background image is coloured wallpaper.
Bruce

Wombatwal said:
Thanks Andrew.
I have not got my head around the basics of CSS as yet.
I still cannot work out how to code my external style sheet to put this
image on every page.
Ed asked if I was using it as a header, footer, link etc, I do not really
know.
Maybe a link, but I do know I need the image on every page.
It has me stumped, I have a book on HTML and style sheets plus I am
looking on the internet, I am lost.

Bruce

Andrew said:
G'day all
I am starting a Family History web site.
I have a logo in the form of a small jpeg image.
How do I code that into my css page so it will appear on every page.
Thanks

Hi Bruce,

I see someone has already helped you with the logo. Just a little
[OT] welcome to the Family History web site world! I have been doing
my father's site for several years now: see the signature file.

All the best,

Andrew.
 
J

Jonathan N. Little

Wombatwal wrote:

!TOP POSTING CORRECTED!
> "Andrew said:
>> On Tue, 29 Aug 2006 00:30:53 GMT, "Wombatwal"
>> said:
>>> G'day all
>>> I am starting a Family History web site.
>>> I have a logo in the form of a small jpeg image.
>>> How do I code that into my css page so it will appear on every page.
>>> Thanks
>> Hi Bruce,
>>
>> I see someone has already helped you with the logo. Just a little
>> [OT] welcome to the Family History web site world! I have been doing
>> my father's site for several years now: see the signature file.
>>
Thanks Andrew.
I have not got my head around the basics of CSS as yet.
I still cannot work out how to code my external style sheet to put this
image on every page.
Ed asked if I was using it as a header, footer, link etc, I do not really
know.
Maybe a link, but I do know I need the image on every page.
It has me stumped, I have a book on HTML and style sheets plus I am looking
on the internet, I am lost.
Bruce

You are probably making a fundamental error here, CSS is for styling not
for adding content, that is what your markup (The HTML part) is for. A
logo I would say is content and should be defined in your HTML. Whether
or not you indent your paragraphs, or your text is black or brown, or if
the background is an image of a pretty blue sky or just plain white is a
style issue and under the auspices of your stylesheet.

If you want a common banner with your logo that should be done with
HTML. If you want to include it on every page, well that is a matter of
SSI or CGI methods of including a file.

http://www.boutell.com/newfaq/creating/include.html
(WWW FAQs: How do I include one HTML file in another?)
 
H

harry.michaels

Wombatwal said:
Thanks Andrew.
I have not got my head around the basics of CSS as yet.
I still cannot work out how to code my external style sheet to put this
image on every page.
Ed asked if I was using it as a header, footer, link etc, I do not really
know.
Maybe a link, but I do know I need the image on every page.
It has me stumped, I have a book on HTML and style sheets plus I am looking
on the internet, I am lost.

As far as I can tell you would have to assign an ID to a tag (such as
<h1>) and then define that ID as an image (with the local URL). All in
all, it's a lot easier just inserting the standard <img> tag, as the
long-winded CSS method would also require entering a tag on each page
to call up the image based on the stylesheet's configuration. No work
saved, except maybe a few keystrokes.

Harry Michaels
 
A

Andy Dingley

Wombatwal said:
I have a logo in the form of a small jpeg image.
How do I code that into my css page so it will appear on every page.

First of all, ask yourself what this thing is. Is it content or
wallpaper? When you print it, would you want it printed or ignored ?
(by default)

If it's content, then it goes into the HTML with an <img> You can add
alt and title attributes too - it's important _content_, so they'll be
easy.


If it's eye-candy, then you can use CSS and the background-image
property. Remember to set an appropriate background-color too, in case
the image fails to load or is turned off by the user.

Look at any CSS reference for the gory details. I suggest the W3C spec,
because it's not too bad to read so long as you know where to start!
(trying to _find_ things in there is hard). url() causes trouble to
lots of people, so begin by placing your HTML page, your CSS and your
images all in the same directory. Set the repeat properties too, which
will probably not repeat if it's a "logo" rather than pure background.

As to the HTML, then place the logo into a <div> and give the div an id
or class attribute (or both) of "logo". Repeat this onto every page,
with your editor's cut & paste feature (it's easier than SSI).

Use a CSS class selector of .logo {} to apply the CSS to the <div>.
This is generally easier than using id as a selector, when you start
having lots of CSS selectors that need to work together,

Set height and width properties on it too, as well as background-image.
Remember that CSS doesn't see background images as significant enough
to warrant wasting screen space on, unless there's some content to show
and you tell it how big to make it. Many people would place a &nbsp;
(non-breaking space) into the HTML, just so that the <div> doesn't get
lost or stripped out.
 
W

Wombatwal

Thanks all, that is a great help. The logo is content, will probably have to
put it on each page.

Bruce
 
N

Neredbojias

To further the education of mankind, "Wombatwal"
I have solved the problem, it may not be elegant, but, I have added a
logo to the background image. The background image is coloured
wallpaper.

Nothing wrong with that, and that's about the only way to page-repeat an
image using just css. You may find it limiting after a while, though, and
then you'll have to, um, work.
 

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,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top