Forum Index > Full Moon Saloon > Html Help with Making a Panorama 100% Size and Scrollable
 Reply to topic
Previous :: Next Topic
Author Message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostTue Oct 11, 2011 12:20 am 
Ok so currently I got it pretty good as seen here: http://www.summitpost.org/mount-shuksan-with-a-lenticular-forming/696383
Code:
<div style="height:583px;width:540px;overflow:scroll;"> <img src="http://images.summitpost.org/original/696383.jpg" border="0" width="auto" height="550" /><br/></div>
But it does not seem to want to display in Internet Explorer. frown.gif So I suppose auto is not supported at times. I've tried all sorts of tricks with html to make it 100% width and scrollable, but unfortunately it then makes the div container stretch to 100%. For those who cannot see the image in the above example, I'm trying to figure out a html code that will allow me to have it so people can conveniently scroll through my panoramas from left to right using a scroll bar. I want the container it self to fill up most/much of the screen in width and be around 583 px in height which I already have set up. But the complicated part is displaying a picture inside the div container to be automatically resized to fit the height of the container. Example: Let's say The container is 500 px by 500 px. The picture is 2,000 px by 1,000 px. The container would display it as 1,000 px by 500 px because it is automatically resizing the picture to fit the proportions of the container. As I said, I already have it "working" in the code near the top but it does not work in ie8. If anyone has any hinters, this would be nice for my future panorama postings.

Back to top Reply to topic Reply with quote Send private message
Bedivere
Why Do Witches Burn?



Joined: 25 Jul 2008
Posts: 7464 | TRs | Pics
Location: The Hermitage
Bedivere
Why Do Witches Burn?
PostTue Oct 11, 2011 3:11 am 
No one with any brains uses IE8 anyway. I wouldn't worry about it. wink.gif

Back to top Reply to topic Reply with quote Send private message
Brian Curtis
Trail Blazer/HiLaker



Joined: 16 Dec 2001
Posts: 1696 | TRs | Pics
Location: Silverdale, WA
Brian Curtis
Trail Blazer/HiLaker
PostTue Oct 11, 2011 9:34 am 
Remove width="auto"; from your img tag. That should fix it.

that elitist from silverdale wanted to tell me that all carnes are bad--Studebaker Hoch
Back to top Reply to topic Reply with quote Send private message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostTue Oct 11, 2011 12:19 pm 
Chainsaw_Willie wrote:
No one with any brains uses IE8 anyway. I wouldn't worry about it. wink.gif
lol.gif Too funny! I don't use internet explorer if that's what your wondering. But unfortunately some people still do. wink.gif (including my brother)
Brian Curtis wrote:
Remove width="auto"; from your img tag. That should fix it.
I removed the "auto" which works just fine in firefox but still is glitched in internet explorer. I see this is why it is such a lame browser. lol.gif (and many other reasons)

Back to top Reply to topic Reply with quote Send private message
Sore Feet
Member
Member


Joined: 16 Dec 2001
Posts: 6307 | TRs | Pics
Location: Out There, Somewhere
Sore Feet
Member
PostTue Oct 11, 2011 6:34 pm 
Your <img> tag isn't closed in the code you posted above. Strange that Firefox and Chrome render it correctly while IE doesn't.

Back to top Reply to topic Reply with quote Send private message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostTue Oct 11, 2011 7:01 pm 
Ok so I closed the tag now, with or without auto ie still cannot read it. shakehead.gif

Back to top Reply to topic Reply with quote Send private message
Sore Feet
Member
Member


Joined: 16 Dec 2001
Posts: 6307 | TRs | Pics
Location: Out There, Somewhere
Sore Feet
Member
PostTue Oct 11, 2011 7:27 pm 
Slightly odd, I thought that would have bugged it out more than it did. This works:
Code:
<div style="height:auto;width:540px;overflow:auto;"><br/><img src="http://images.summitpost.org/original/696383.jpg" border="0"/><br/></div>
If you're going to specify the image size, Internet Explorer requires that both the height and width are there, or else it will render the image as if you're telling it to only show 0 pixels of one dimension.

Back to top Reply to topic Reply with quote Send private message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostTue Oct 11, 2011 7:31 pm 
Alright looking better! But now a new problem is created. Now there is a vertical scroll bar which isn't much but is a inconvenience (the user has to scroll up and down a little to see the full version). Now if I could just figure out that last part. wink.gif Edit: I just figured out a huge flaw in the html code you provided. On big pictures like this it displays too big:
Looking West on Sahale
Looking West on Sahale
http://www.summitpost.org/experimental-test-page/753371

Back to top Reply to topic Reply with quote Send private message
Sore Feet
Member
Member


Joined: 16 Dec 2001
Posts: 6307 | TRs | Pics
Location: Out There, Somewhere
Sore Feet
Member
PostTue Oct 11, 2011 10:07 pm 
Quote:
<div style="height:auto;width:540px;overflow:auto;">
The red attribute will set the height of the box which bounds the image. Having it set to auto will fit it vertically to the size of the picture. If you want it smaller, just put a number in there. You'll get a vertical scroll bar though if the image is just 1 pixel bigger. The blue attribute will automatically put in scroll bars where needed. If you set the box which bounds the picture to a specific size and the picture is bigger than that size, you will always get a vertical scroll bar. In the first instance you were working with, what Internet Explorer does is renders the scroll bars inside of the DIV box (Firefox, Chrome and Safari all render the scroll bars outside of the box, so it isn't an issue), so it overlaps the image, causing the vertical scroll bar to appear. If you want to compensate for this, just add 17 pixels to the height of the box and the vertical bar should disappear. You could also add in the max-height:xxx; attribute, which will allow you to stipulate the maximum height the DIV area should render to. Pictures larger than said height will cause the vertical scroll bar to show up, smaller than said height should fit to the size of the box exactly (assuming you leave the height set to auto).

Back to top Reply to topic Reply with quote Send private message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostTue Oct 11, 2011 10:46 pm 
The good news is that I fixed up my code to work even better in firefox.
Code:
<div style="height:100%;width:100%;overflow:auto;"><br/><img src="http://images.summitpost.org/original/752942.jpg" border="0" width="auto" height="550" /><br/></div>
The bad news is that it still doesn't work with internet explorer. (I know auto doesn't work with internet explorer wink.gif ). So ok I figured out a way to get the div box to work perfect in both browsers, but one huge problem remains. What code makes it so that you can have an image display like this: Height="500" px Weight="X". X being the width based on keeping the image proportions with the 500 px. Here is what I want it to look like (well for the most part): http://www.summitpost.org/middle-chiwaukum-360-view/601315/c-437276 The problem here is that my friend Gimpilator had to manually resize his panorama's thus lowering the details which I am not in favor of doing. I even tried adding a doc type to see if that would change anything. I used this reference: http://www.w3schools.com/cssref/pr_pos_overflow.asp Lately I been reading up into html and css to become more familiar with it (I've been for a while, but now I'm really understanding it). wink.gif

Back to top Reply to topic Reply with quote Send private message
Josh Journey
a.k.a Josh Lewis



Joined: 01 Nov 2007
Posts: 4836 | TRs | Pics
Josh Journey
a.k.a Josh Lewis
PostWed Oct 12, 2011 12:37 pm 
The mystery is solved here: http://www.summitpost.org/phpBB3/html-help-with-making-a-panorama-100-size-and-scrollable-t60076.html#p851721 So this whole time if we did not even put in the height attribute for the image, this would have solved the problem. Well at last it is figured out. (I did a bunch of research trying to figure this one out)

Back to top Reply to topic Reply with quote Send private message
   All times are GMT - 8 Hours
 Reply to topic
Forum Index > Full Moon Saloon > Html Help with Making a Panorama 100% Size and Scrollable
  Happy Birthday Crazyforthetrail, Exposed!
Jump to:   
Search this topic:

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