Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynamic width of a page

Featured Replies

I am trying to create a template for images that scroll horizontally and also fill 100% of the height of the page. I have most of the coding worked out but am struggling with a way to automatically extend the page horizontally to fit any content added to it. I can set a standard width for the page but that means that the images either wrap onto the next line or there is excess space to the right of the last image. This all depends on the height / size of the browser, which in turn makes the width longer / shorter.

 

My client is going to add his own content for a variety of different galleries which will vary in the amount of images included and also the size of them.

 

Please take a look here to see what I mean - http://www.booheads.co.uk/height/

 

Any help of advice would be much appreciated.

 

Thanks,

Steve

P.S. please let me know if I should include any other files.

  • Author

thanks for your suggestion, but I'd really like to figure this one out myself and not use a template. I might try to see if I can take a look at the code from one of their templates to get some hints.

 

Search through these, there's load of image galleries thats fill the page and scroll: http://themeforest.net/searches?term=photography&type=files

Edited by MikeChipshop

how are the images resized? What is driving that?

Will you be loading the images via a database ?

  • Author

the images are resized at 100% height of the container div via the css file.

I will be inserting the images manually not via a database.

 

I can attach the css file if that helps?

 

how are the images resized? What is driving that?

Will you be loading the images via a database ?

okay, just wondered as if it were via a database and you're having a max-height of 1024px you could at least calculate the maximum width of the content div. Not the ideal solution, I suspect that would need to have some nifty jquery (or mootools) to calculate the width but I can't see how as the resize of the screen could happen at any time?

 

If the screen didn't change could you calculate the window height, use that compared to the size of the image you want to display and then work the width from that?

 

This guy has some very nifty work which may have something http://www.dhteumeuleu.com/

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.