Jump to content

Recommended Posts

Hi, please can someone help me...

 

I am making my own website.. and using CSS for styles.. i want to have my logo from the main page to appera on every page with out me having to copy and paste.....

 

i will be really greatfull if some one can help me

 

MAny thanks and best of luck with the futre.

Link to comment
https://forums.phpfreaks.com/topic/42645-css-website-logo-to-appear-in-everypage/
Share on other sites

Place your image in a div and give the div and id. Then you can set the background image of that div to the logo, the div will have to go on each page. This is the best way to do what you want (with css), where you can change it in the css and it changes on each page.

 

HTML Code:

<div id="logo"></div>

 

CSS Code:

#logo {
background-image: url(images/logo.jpg);
}

 

 

Of course change images/logo.jpg to your logos path. Hope this helps, if not what you were going for then please elaborate on your question. Good luck.

The only option with css is the set the logo as a background image on one of your elements that appears on each page. I typically place the logo inside an img tag rather than using it as a background image.  Ideally, you should create an included page.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.