SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : HTML and CSS :

Previous DiscussionNext Discussion
 shrinking an img inside a td

I've got this gradient bar, originally 700px wide, that should expand and contract with page width (see the div tag within the td.)  By itself outside the table, it works.  Inside the table, it does not shrink below 700px, but it will expand.

In Firefox and netscape it shrinks properly, but not IE.  So what is it about the table that it behaves differently in IE?  IS there a fix for this that does not require javascript to change the img size by code?

Thanks for any help!

 

<table width=100%>
  <tr>
    <td style="width:100%">
      <div style="width:100%"><img src="graphics/misc/grad_bar.gif" width=100% height=10 alt=""></div>
    </td>
  </tr> 
</table>

 

P.S.  I tried adding width:100% to the body and html, and every possible combination, but no luck.

Started By wasnewski on Sep 18, 2007 at 7:24:48 AM
This message has been edited.

10 Response(s) | Reply

Earlier Replies | Replies 4 to 10 of 10 | Later Replies
Goto Page: 2 1
wasnewski on Sep 20, 2007 at 7:41:04 AM (# 4)

I appreciate you taking the time to respond, Brian, although that does not help.

I guess this is not the place to get answers on HTML help, although I was mislead by the homepage information.  Silly me.

Thanks anyways.


brian on Sep 20, 2007 at 8:12:07 AM (# 5)

ok, try this:

Lose the table and put this in, in its place.

<div style="width:100%;height:10px;background-image:url('graphics/misc/grad_bar.gif');"></div>

This will definitely work....probably....a lot of people might argue it's the correct way to do it. I say whatever works.

As for getting responses, you do generally get replies but you do have to be patient...it's mainly people volunteering their advice in their own time...if you want a quick answer, go buy some books. (DHTML - the Definitive Reference is an excellent book published by O'Reilly btw)

The site has been pretty slow of late however.

As for IE and Firefox, they just do things differently. You can perhaps try XHTML strict/transitional modes as well, it often helps with compatibility.


wasnewski on Sep 21, 2007 at 2:22:00 PM (# 6)

Thanks, I know it works without the table.  The table is required, however for another reason.


RobinAnn on Sep 24, 2007 at 8:48:20 AM (# 7)

...the OFFICIAL RobinAnn Posting Style...
~ Gratuitous Answer Post~

Usually, when no one replies, there is no way to do it -- or at least no way that none of the 'regulars' here knows of...

Sincerely,

RobinAnn
 
webmaster/photoartist
Huh?


brian on Sep 24, 2007 at 9:28:01 AM (# 8)
This message has been edited.

have you tried the div inside the table cell???

OR, even, setting the background of the table cell instead...that would also work.

And...tables required....that's an oxymoron if ever I heard one...


Jaky123 on Sep 26, 2007 at 4:06:50 PM (# 9)

Yeah,thank you. I will have a try.

 

iphone accessories

ipod video converter 


cash on Dec 1, 2007 at 11:18:55 AM (# 10)

i had the same problem.
thanks
cash
http://tech-unite.com/forum/viewtopic.php?f=5&t=10


Earlier Replies | Replies 4 to 10 of 10 | Later Replies
Goto Page: 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.