Jump to content

Header Banner


CPC900

Recommended Posts

No, I mean....someone once edited this kind of thing before for me. There was, almost like, code that cut off the right side of the image, which was only the colors of the picture, and continued that part on. Almost like it cut off the edge, created a new picture, then made it all look like one. I can't think of how to explain it better, sorry :(

Link to comment
Share on other sites

It's pretty simple. Take the banner into photoshop or another image editor, and copy the very last 1 pixel to another file. Save it, upload it, then use the new image as the CSS background image for the header, with repeat-x set. Then create a child div and set the logo as the background to it, or just call it within it as a regular HTML image, your choice.

Anyway, see here for the example: http://jsfiddle.net/tutmeister/X9xyQ/6/embedded/result/

You'll have to excuse the smaller logo, my photobucket account automatically resized it and I couldn't figure out how to make it not resize. The basic idea is that the background will repeat to infinity, thus creating the illusion of a never-ending logo.

  • Like 1
Link to comment
Share on other sites

aarbee, the reason you shouldn't create a very long image is because of the bandwidth it takes up. Both for the client, who will experience longer page loads; as well as the server-side, which will see more bandwidth eaten up. The method I used above is the most efficient way to create the illusion.

Link to comment
Share on other sites

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.

Loading...
×
×
  • Create New...