Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 06 May 2016, 10:59
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
JS make image screen size upto a certain size. (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
chapchap70

Joined: 18 Nov 2010
Posts: 165
Location: The Island Of Long (NY, USA)

PostPosted: Thu 04 Feb 2016, 13:13    Post subject:  JS make image screen size upto a certain size. (Solved)  

I embedded a script into my website so I can have a rotater. The script is located at http://www.htmlgoodies.com/beyond/javascript/article.php/3881826/JavaScript-Tutorial-Adding-Rotating-Images-to-Your-Web-Site.htm

My website is http://www.globalwarmingllc.com

The script unmodified works well on large screens but doesn't fit in mobile devices. I had trouble modifying it I am using a templated design with CSS and the metatags I found to fit across all devices didn't work. I finally used something like "image: full" and it works nicely on mobile devices now. The problem is it doesn't need to be that big on desktop monitors. (Although I have to say, my artwork is exquisite) Exclamation Laughing

Is there a simple way to use the image full idea only up to the actual size of the image (say 500X600 pixels) and have it centered on the page?

Last edited by chapchap70 on Sat 06 Feb 2016, 23:43; edited 1 time in total
Back to top
View user's profile Send private message 
gcmartin


Joined: 14 Oct 2005
Posts: 6243
Location: Earth

PostPosted: Thu 04 Feb 2016, 15:56    Post subject:  

Hello @ChapChap70

As far as I know, and that's very little in web design, at the server side you detect the device on the other side where you will then generate the appropriate format; mobile/non-mobile. This is often seen where a "some-site" URL you type on your mobile device is changed to 'm.some-site.." because of that detection sequence.

Hope that helps.

P.S. Your participation is requested, here.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
gungsukma

Joined: 18 Sep 2011
Posts: 19

PostPosted: Fri 05 Feb 2016, 03:10    Post subject:  

<img src="..." style="max-width:500px; max-height:600px;"/> ?
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Fri 05 Feb 2016, 12:56    Post subject:  

I would try
Code:
<img src="..." style="max-width:500px;"/>

or
Code:
<img src="..." style="max-height:600px;"/>

or
em
or
%
Back to top
View user's profile Send private message 
chapchap70

Joined: 18 Nov 2010
Posts: 165
Location: The Island Of Long (NY, USA)

PostPosted: Sat 06 Feb 2016, 23:42    Post subject:  

Thanks guys.

I used the max-height option to squish the images so people don't have to scroll up and down to see the whole image. I was putting max-height in the wrong spot.

The images stretch across the page but they are stick figures. Good enough!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0664s ][ Queries: 11 (0.0149s) ][ GZIP on ]