Jump to content

CSS website logo to appear in everypage


Shah_10

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.