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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:10:53+00:00 2026-05-28T22:10:53+00:00

So in an html.erb document I have a table with in it and in

  • 0

So in an html.erb document I have a table with in it and in that table is an image scaled to the size of the column like so:

   <table width="900" border="0" align="center" valign="top">
      <tr>
        <td><img src="someimage.gif" width="35%" height="95%" /></td>
        <td>a whole bunch more html content here</td>
      </tr>
     </table>

It works fine in Chrome but for some reason when I load the page in either IE or Fire Fox it shows the image in its original size, not scaled to the size of the of the column like it should be. I tried removing the height and weight properties instead replacing them with some in line CSS like this:

    <img src="someimage.gif" style="height:95%;width:35%"/>

but again I encounter the same issue. Works fine in Chrome but not in the other two. Does anybody know what might be causing the compatibility issue and what I can do to fix or work around it?

Edit: I probably should have mentioned that I tried defining the size of the images both in an external CSS file using absolute and relative as arguments for the position, followed by pixel values for the size, then later, after removing that CSS code, in the height and width section of the HTML5 img tags. In both cases zooming in any browser screwed up the overall look of the site which was why I switched to using percent values.

  • 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-28T22:10:54+00:00Added an answer on May 28, 2026 at 10:10 pm

    The browser cannot determine the width of columns until it has determined the (width of) its contents. And in your case the width of content depend of width of column. You’ll get unexpected results depending on browser and depending on whether the image is present in the cache or not.

    Specify a width and height for the column and you’ll get the expected, consistent results. See demo here.

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

Sidebar

Related Questions

I have the following html.erb code that I'm looking to move to Haml: <span
I have this code in my index.html.erb file in my project: <h1>Listing businesses</h1> <table>
I have the following in a html.erb file: <%= @location_list = [['test',2]] %> <script
In my rails view(index.html.erb), i have following structure <div> <%= render :partial => create
I have this code in a .html.erb file: <script src=http://connect.facebook.net/en_US/all.js#xfbml=1></script> <script> FB.Event.subscribe('edge.create', function(response) {
I have 3 files: index.html.erb is my homepage inside the index I render a
I am using rails beta 3 and I have a erb page named index.html.erb
I have a Javascript where I render a partial using the js.erb : $('#registration-steps').fadeOut(fast).html(<%=
I quite like that WMD is behaving nicely with my app. However, I have
I have a 3x3 table of td's each with id's (id='a1'...id='c3'). I'd like to

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.