Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

IE7 DIV width problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PJ6 - 14 Sep 2007 14:41 GMT
In IE6 I can force a DIV to automatically size to the width of its contents
by setting its width to 1px. This doesn't work in IE7, it tries to render
the DIV at the specified width, cutting off its contents. If I remove the
width entirely, the DIV goes to 100% of the screen width. Will I not be able
to have any shrink-to-fit DIV's in IE7?

Paul
Mark Rae [MVP] - 14 Sep 2007 14:51 GMT
> In IE6 I can force a DIV to automatically size to the width of its
> contents by setting its width to 1px. This doesn't work in IE7, it tries
> to render the DIV at the specified width, cutting off its contents. If I
> remove the width entirely, the DIV goes to 100% of the screen width. Will
> I not be able to have any shrink-to-fit DIV's in IE7?

Are you doing it like this: ?

<div style="width:auto;">

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

PJ6 - 14 Sep 2007 14:54 GMT
> Are you doing it like this: ?
>
> <div style="width:auto;">

width:auto causes the DIV to size to 100% of the page

Paul
PJ6 - 14 Sep 2007 15:03 GMT
>> Are you doing it like this: ?
>>
>> <div style="width:auto;">
>
> width:auto causes the DIV to size to 100% of the page

Never mind, I foudn the problem. I had a buried element within the DIV that
was 100% width.

Thanks,
Paul

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.