Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How do I resize header logo based on visitors screen resoloution..
Old 03-02-2011, 10:29 PM How do I resize header logo based on visitors screen resoloution..
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Does anyone have the javascript that will allow me to resize a 'master logo' to lower screen resoloutions automatically? Meaning when the page loads, the javascript will resize one large logo down to fit the visitors screen correctly?

I do NOT want the script that allows you to specifiy multiple images. I am trying to find the javascript that will resize one 'master logo' that is the max size and get's resized down to the lower resoloutions automatically.

Thanks, and sorry if I explained that wrong, but I know one exists, but I can't find it.
__________________
Made2Own

Please login or register to view this content. Registration is FREE

Last edited by Brian07002; 03-02-2011 at 10:44 PM..
Brian07002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-02-2011, 11:26 PM Re: How do I resize header logo based on visitors screen resoloution..
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Quote:
Originally Posted by cartergarth View Post
Add this javascript code to your overall_header.html file just above the </head> line:
<script language="javascript">
<!--
writeCookie();

function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2023");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "user_width="+ screen.width;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
}
//-->
</script>
Do I call it with the usual img tag or is there something else I need to know?Sorry for the noob question.

Thanks!
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I resize header logo based on visitors screen resoloution..
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36179 seconds with 12 queries