473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

IE equivalent for max-width?

This does exactly what I want in Mozilla:

<div style='margin-left: auto; max-width:740px; margin-right:auto'>
<div style='margin-left: 120px; max-width:500px; text-align:justify'>
<div style='margin-left:-120px; float:left'>
<img src='graphic.png' width='105' height='105' />
</div>
<p>lots of text here</p>
</div>
</div>

By "exactly what I want" I mean:

- if window is large enough, a column of text 500px wide, centered,
with a graphic in the 120px left margin;

- if window is not large enough, the left margin will not shrink
(thus preventing graphic from being pushed out of sight), but the
right margin will shrink;

- as window shrinks further, the text column will begin to shrink
(but only after the right margin has reached zero).

However, max-width is not supported on IE. In fact, the graphic
disappears completely (not sure why). How can I achieve the same
effect on IE?

TIA,
Steve
Jul 20 '05 #1
1 3905
On 11 Sep 2004 21:40:54 -0700, st*********@hotmail.com (Steve Kobes)
wrote:
By "exactly what I want" I mean:

- if window is large enough, a column of text 500px wide, centered,
with a graphic in the 120px left margin;
Don't want that. Size the text column(s) in ems.
However, max-width is not supported on IE. In fact, the graphic
disappears completely (not sure why). How can I achieve the same
effect on IE?


There is a hack described at
http://www.svendtofte.com/code/max_width_in_ie/

Be aware though that getting it to work properly can be considerably
more work than this page suggests. For example you will need a media
print override. And the slightest extra variations in the layout may be
difficult to handle or even insoluble. Do hide it in a separate
iehack.css which is linked to in an IE conditional comment, to make sure
no other browsers (or the validator) fall over it.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Code_Dark | last post by:
Hi, I'm coming over to python from C and C++, and I was just wondering if there's an equivalent of the Do-While fuction that I'm so fond of... I really like it, and it's handy for asking the user...
15
by: Dan | last post by:
Is there a python equivalent of this trick in C? Logic_Test ? True_Result : False_Result Example: printf( "you have %i %s", num_eggs, num_eggs > 1 ? "eggs" : "egg" );
11
by: Dark Cowherd | last post by:
http://www.ucalc.com/mathparser/index.html There is a great library called UCALC which allows you to set up an expression and evaluate it for e.g. you an define an expression by calling a...
3
by: Will Chamberlain | last post by:
I have looked around and found the equivalent for IIF (Access) to be a SELECT CASE in SQL. I have tried this with no success. I am also looking for the equivalent of MAX and have had no luck. The...
6
by: Jeff Kish | last post by:
Hi. I'm a casual sql user. I have found a situation where I need to convert an oracle statement to tsql, one I can just fire off in any sql tool against an ms sql server database. I studied the...
10
by: Neuruss | last post by:
I'm sorry for asking about another language here, but since I only know Python and I'm trying to write something in C#, I guess this is the best place... I'd like to know how to write this in...
0
by: AJ | last post by:
Hi all, I have the following query which isn't quite finished! 1) How do i specify the '@Country' parameter is optional in an ACCESS stored query? (like MSSQL @Country INT = NULL) 2) What is...
1
by: vivekgrs | last post by:
hi everybody, i am working in ms - access. i want 2 select the max imum number of particular column and i want 2 add 1 to that. if the table is empty, that statement wants 2 work, i had...
5
by: Greg | last post by:
I can see there is no simple way to define a type like just a simple C++ typedef, such as typdef signaltype double; Using #define seems like a bad idea if it works atall. Using a struct...
10
by: cppquester | last post by:
I got an app where a bunch of values are set before the calculation is fired up. I need an elegant way to check if all variables have been set. So for example for double I am thinking about a ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.