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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:58:25+00:00 2026-05-19T01:58:25+00:00

I have a div whose contain a flash and a image,and I want them

  • 0

I have a div whose contain a flash and a image,and I want them displayed inline,and want the flash div take the rest width of the container(the image div should take the width as the image itself).

So I make the flash float left.

<div id=chartcon>
    <div id="chartflash" style="float:left"></div>
    <div id="map"><img src="../example.jpg"></div>
    <div style="clear: both;"></div>
</div>

But it does not work,the image always sit under the chartflash div.

It seems that the chartcon’s width is too large,so the map div have to sit under it.

So I try to calculate the width and height of the chartflash div dynamiclly:

var mapWidth = parseInt($('#map img').css('width'));
var mapHeight = parseInt($('#map img').css('height'));
var chartwidth = parseInt(window.screen.width - mapWidth - 70);
$('#chartflash').width(chartwidth);

The ’70’ is not sure(I have try it many times),if it is smaller than 70,the image will also displayed under the chartflash div.

Though the problem is sloved by calculate dynamiclly,but I do not think it is a good idea,I wonder if there is any css ways to make this?

  • 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-19T01:58:25+00:00Added an answer on May 19, 2026 at 1:58 am

    I would put the image inside the div containing the flash file, and float it right.
    I put the css inline so you see it in context.

    <div id="chartcon">
        <div id="chartflash">
                <div id="map" style="float:right"><img src="../example.jpg"></div>
                <div style="clear: both;"></div>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this container div whose width I would like to set according to
I have a div (with a background image) and the image's width is 40px.
I have several div 's that contain a floated image and an unordered list.
I have some divs which contain an image that fills the whole div: <div
I have a div container on my web page with fixed width and it
I have a div whose position has been fixed. Everything is fine till the
I have whole bunch of <div class=productlistname><a href=#>The Text!</a></div> . What I want to
I have div class=contentBlock which is treated as the container for updating <div class=contentBlock></div>
Suppose I have div and I want to fetch data and push data into
so i have a swf with a simple animation- the div used to contain

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.