Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   JavaScript Code for automatic Resize??/ (http://www.chiefdelphi.com/forums/showthread.php?t=55120)

Compnerd 28-02-2007 22:01

JavaScript Code for automatic Resize??/
 
I am looking for a script, that will allow me to have the content automatically fit the browsers window, without having to scroll left and right..

Thanks,
Compnerd

Ricky2443 28-02-2007 22:25

Re: JavaScript Code for automatic Resize??/
 
its not a script its jus the way you set the hieght and width in the CSS that does that.

Compnerd 28-02-2007 22:30

Re: JavaScript Code for automatic Resize??/
 
I haven't learned CSS yet. That is one of my plans for this summer. Could you explain this?

Ricky2443 28-02-2007 22:57

Re: JavaScript Code for automatic Resize??/
 
wait wat do u mean do u want to resize pictures or the actual page. CSS is for the page jus set ur width to 100%

artdutra04 28-02-2007 23:36

Re: JavaScript Code for automatic Resize??/
 
Auto-resizing the page width to be say 100% of the browser window is easy. The simpliest way of doing it is to use this code:
Code:

<style type="text/css">
body {
    width:100%;
}
</style>

However, you would be better to use an external CSS stylesheet. If you visit W3Schools.com's CSS section, you should find a bunch of easy to learn CSS tutorials that can help you. ;)

pheadxdll 01-03-2007 10:57

Re: JavaScript Code for automatic Resize??/
 
We're ever the img tag is for the image put a style tag in it like this:

<img style="width: 100%;" src="picture.gif"/>

SamC 01-03-2007 12:41

Re: JavaScript Code for automatic Resize??/
 
Quote:

Originally Posted by pheadxdll (Post 588203)
We're ever the img tag is for the image put a style tag in it like this:

<img style="width: 100%;" src="picture.gif"/>

Or in your CSS file add this,

Code:

img {
    width=100%;
}

That will make all images that big. ie. Whenever the <img .... /> tag is used.


All times are GMT -5. The time now is 16:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi