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 7637741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:00:51+00:00 2026-05-31T08:00:51+00:00

EDIT: Sorry Guys, This has been resolved The comment to check the inline style

  • 0

EDIT: Sorry Guys, This has been resolved The comment to check the inline style has fixed the issue. The problem wasn’t actually in the css, but in the javascript. Sometimes, when you code for too long you tend to miss these things. Still, thanks for the help

I having a bug with my css. When I disable caching in firefox, the width of an aboslute positioned container div doesn’t stretch to fit the child div. When I reload the page (image has been cached in the browser), it exectures properly. Centering is done by a javascript(works great, but it doesnt center when the image is cached, because the width of the parent(lbCenter)=0).

<div id="lbOverlay" style="background: url("blue.png") repeat scroll 0% 0% transparent; opacity: 0.25;"></div>
<div id="lbCenter" style="display: block; padding: 0px; left: 675px; top: 305px; width: 0px; height: 0px; margin-left: 0px;">
<div class="lbcb"></div>
<div id="lbWrap">
<img src="http://www.emohaircuts.org/wp-content/uploads/2010/08/emo-boy-fashion.jpg">
</div>
</div>

CSS:

#lbOverlay {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;    
    height: 100%;
}
#lbCenter {
    overflow:visible;
    display:block;
    text-align:center;
    position: absolute;
/*  padding: 20px;*/
    z-index: 110111111;
    outline: none;
}
/**------*/
#lbCenter{
color:green;
border: 10px solid #CCCCCC;
}

How can I achieve that when the content of lbWrap changes, the parents width get automatically updated? For example when the image has been fully loaded/

  • 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-05-31T08:00:52+00:00Added an answer on May 31, 2026 at 8:00 am

    I believe that if you specify width and height, then your problem might be solved. Even if it wouldn’t it is always good practice to include these values, because browser will know how much space it should reserve for the image (that is why I think it could help). Also, it is a good practice to include alt attribute (for search engines or in case the image cannot be displayed)

    <img src="http://www.emohaircuts.org/wp-content/uploads/2010/08/emo-boy-fashion.jpg" height="351" width="263" alt="Emo boy">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: Sorry guys, but I wasn't seeing this behavior when I came into work
Edit: I fixed the problem by just starting from scratch. Sorry to waste y'alls
Edit: Sorry guys, I got the issue, Misspelled class name :( Hey, I got
Edit: I am using SqlDataAdapters to fill the data sets. Sorry--I should have been
Sorry if this question will sound too chaotic, feel free to edit it. I
Edit: Sorry guys, realised I have no idea when it comes to integrating Webservices
sorry guys, asked a bit wrongly, here is the EDIT got a simple question,
Well guys, here i am. In three days i couldn't resolve this problem. (I'm
EDIT Sorry I forgot the most important part here. Each key can have more
IMPORTANT EDIT: Sorry everyone, i made a big mistake in the structure. char *name;

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.