/    Sign up×
Community /Pin to ProfileBookmark

How to make site auto resize in browsers

How do I make my site automatically resizable in different browsers? I realize that some people use 800×600 others use 1024×768…

my site is:

[url]http://www.hairbegone.ca/test_page.htm[/url]

to post a comment
Full-stack Developer

6 Comments(s)

Copy linkTweet thisAlerts:
@thenetfreakerDec 07.2003 — I think you should use a popup window code, try this:

<script language="javascript">

function jumper() {

var w = screen.width;

if(w<740){

window.open('cat','cat.html','width=650,height=500

toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,');

}

if(w>=740 & w<835){

window.open('hat','hat.html','width=650,height=500

toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,');

}

if(w>=835){

window.open('mat','mat.html','width=650,height=500

toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,');

}

}

</script>

it should do the trick
Copy linkTweet thisAlerts:
@utillaauthorDec 07.2003 — Thanks! I'll give this a try.
Copy linkTweet thisAlerts:
@thenetfreakerDec 07.2003 — have fun
Copy linkTweet thisAlerts:
@PeOfEoDec 07.2003 — or you could just make your layout fluid by using %'s for widths. 13% of the internet does not have javascript so 13% of your users cant use your site if you run that script.
Copy linkTweet thisAlerts:
@katipayDec 14.2003 — i have a different problem on my site....i use an 800x640 resolution when building my site and my body background on that site runs well in that resolution but when i try viewing in 1024x768 resolution,it shows a tiled body background and i don't want this one....please help....
Copy linkTweet thisAlerts:
@PeOfEoDec 14.2003 — put this in your head section
<i>
</i>body
{
background: #000000
url("/somegif")
no-repeat
/* fixed */
center center;
}

you can change the center center to position to back ground image. Get rid of the /* */ if you want the background to be fixed so it stays when the user scrolls
×

Success!

Help @utilla spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...