Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8635217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:55:15+00:00 2026-06-12T09:55:15+00:00

I have a DIV which is of a fixed width/height, is Overflow: Hidden and

  • 0

I have a DIV which is of a fixed width/height, is “Overflow: Hidden” and contains a lot of IMGs which are “Display: Inline” and “Float: Left”

Obviously only the first few images are ‘visible’ – the rest disappear off into the ‘hidden’ area of what is a very, very wide DIV.

If this were a scrollable DIV with non-inline elements, I could easily implement a system whereby the IMGs don’t load their ‘src’ until they become ‘visible’ – but I can’t find a way of determining the ‘real’ position of inline’d and float:left’d images – e.g. there’s no way to tell if they’re in the ‘visible’ part of the DIV?

Any ideas? Things like Offset and CSS Left/Top are all 0 (obviously)??

p.s. to enhance the question – what I want to do (in jQuery because I think in that!) is

$("#container img").each(function() {
  if ($(this).isinthevisiblepartofthecontainer) ...
});

p.p.s. it occurs to me that I could just ‘count widths’ – assuming I can get the elements in order – so something like this

var width = $("#container").width();
var sofar = 0;
var imgs = $("#container img");
var idx = 0;
while (sofar < width) {
  var img = $(imgs[idx]);
  img.dowhatsoeverIwanthere
  sofar += img.width();
  idx++;
}

It’s crude but assuming it returns the elements in the right order (and it seems to) it would work…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:55:17+00:00Added an answer on June 12, 2026 at 9:55 am

    After much investigation I’m concluding that you cannot determine whether FLOAT:ed elements are within the visible portion of a scrolling div via any attribute they may have.

    You can calculate their position by adding-up their widths/heights and then see if this ‘position’ is within the visible area but there’s no other way to determine their ‘visibility’.

    Not entirely surprising – they’re dynamically layed-out for a reason – and it’s not hard to calculate their position…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a div with a fixed height and width, which I am
I have a container div with a fixed width and height , with overflow:
I have a fixed width and height div which will hold an amount of
I got a div which is of fixed width and height: #containersimg { width:
I have a row (implemented with a div), which has a fixed width and
I have a div ( .outer - the viewport) with fixed height that contains
I have a div that I want to specify a FIXED width and height
I have a (fixed-width and height) label which sums up a long list of
I want a div with a fixed width image on the left and a
I have a div with width:100px and height:100px (say) Inside that, there is just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.