tags:

views:

81

answers:

3

What is the best method to put my company logo with a link at the end of the footer in every website which I make (if the client allows me)?

First, I would host the logo image on my site. What would then be the best method in xhtml and css for me to put in my logo?

+1  A: 

You would be better served to inject a reference to a JavaScript file and reserve a certain size in every footer in order to adapt your content. This will allow you to make changes going forward. However, understand that most clients won't want this and that you will be getting a number of requests from all of your clients customers hitting your site frequently.

Nissan Fan
Which means your site had *better* be very fast, otherwise you'll manage to slow down all your clients' sites simultaneously. Not the best advertisement.
Michael Myers
+2  A: 

You could use an img tag wrapped in a tags.

Johannes Gorset
Nice, old school.
Chuck
+1  A: 

Include a javascript from your server to add this. That way, you can modify it in the future if you need to without having to touch your client files. Of course, this won't get you an notoriety with people browsing while having javascript disabled.

    <script type="text/javascript" href="http://mysite.com/siteby.js"&gt;&lt;/script&gt;
  </body>
</html>

siteby.js would exist on your server. It would have something similar to the following:

// Create a link
var link = document.createElement("a");
link.setAttribute("href", "http://mysite.com");
link.innerHTML = "Site by Jonathan Sampson";

// Add it to the body
document.body.appendChild(link);

Just be sure that whatever you place in this script is efficient, and quick, and that your server delivers it with haste.

Jonathan Sampson
how can you explain me? do u mean one extra external js?
metal-gear-solid
but where to put logo image
metal-gear-solid
Voted for you for Moderator 2010.
metal-gear-solid
@Jitendra: Thank you! I appreciate your vote. With regards to the image, you could add it within the `link.innerHTML` as HTML, or you could `document.createElement("img")` and append it as a child to the link, just as we did the link to the body.
Jonathan Sampson
where to write css for this <a> tag. I want to use logo link like we use in header, image replacement method.
metal-gear-solid
@Jitendra: You can do your styling within javascript. For instance `link.style.backgroundColor = "#333"` would set our links background color very dark. Some of the style attributes have slightly different names, so I would consult a reference like this: http://www.w3schools.com/jsref/dom_obj_style.asp - Of course you could do the styling in a CSS file that you load in via the Javascript too.
Jonathan Sampson