473,414 Members | 1,636 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,414 software developers and data experts.

IE6 and IE7 shift text down in small browser window

I've got a page with two columns: one floats left, the other doesn't
float. The page displays fine in Netscape no matter what. In IE (both
6 and 7), it looks fine as long as the browser window is more than 800
pixels wide. However, when the browser window gets narrow, IE pushes
the text in the right-hand column to below where the left-hand column
ends. I can't figure out where I went wrong.

Sample page is http://www.walkinministryofhope.org/services.html -- all
the pages on the site behave the same way.

CSS is http://www.walkinministryofhope.org/styles.css. Some of the
main bits are:

..header { width: 780px ;
height: 80px ;
}

..maintext { background-color: #FCFCFC ;
width: 642px ;
margin-left: 135px ;
}

..leftmenu { background-color: #FCFCFC ;
float: left ;
width: 133px ;
}

I've tried playing with the widths, margins and padding of each of
these sections, but nothing seems to work.

Thanks for any help you can give me!

Karen

Aug 12 '06 #1
6 2988
On 2006-08-12, kk*******@gmail.com wrote:
I've got a page with two columns: one floats left, the other doesn't
float. The page displays fine in Netscape no matter what. In IE (both
6 and 7), it looks fine as long as the browser window is more than 800
pixels wide. However, when the browser window gets narrow, IE pushes
the text in the right-hand column to below where the left-hand column
ends. I can't figure out where I went wrong.

Sample page is http://www.walkinministryofhope.org/services.html -- all
the pages on the site behave the same way.

CSS is http://www.walkinministryofhope.org/styles.css. Some of the
main bits are:

.header { width: 780px ;
height: 80px ;
}

.maintext { background-color: #FCFCFC ;
width: 642px ;
margin-left: 135px ;
}

.leftmenu { background-color: #FCFCFC ;
float: left ;
width: 133px ;
}

I've tried playing with the widths, margins and padding of each of
these sections, but nothing seems to work.
Have you tried deleting "width: XXpx" altogether? (Except on the
.leftmenu, and there, and in the largin-left, replace px with an
apropriate width in ems.)

If you have a window narrower than 800px how can you expect to fit
more than that horizontally?

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 13 '06 #2
Chris F.A. Johnson wrote:
>
Have you tried deleting "width: XXpx" altogether? (Except on the
.leftmenu, and there, and in the largin-left, replace px with an
apropriate width in ems.)

If you have a window narrower than 800px how can you expect to fit
more than that horizontally?
I don't expect it to fit more than 800px horizontally; I just expect it
to leave the text in place when it adds the horizontal scroll bar.

If I don't specify the widths of the divs, how do I control how wide
the text is on the right-hand side of the screen? I really hate
columns of text that are wider than about 500px, but I'm not sure how
to control the layout if I don't limit the width of the text area.

*sigh* Back to the drawing board, I suppose.

Thanks for your suggestions.

Aug 13 '06 #3
On 2006-08-13, Karen wrote:
Chris F.A. Johnson wrote:
>>
Have you tried deleting "width: XXpx" altogether? (Except on the
.leftmenu, and there, and in the largin-left, replace px with an
apropriate width in ems.)

If you have a window narrower than 800px how can you expect to fit
more than that horizontally?

I don't expect it to fit more than 800px horizontally; I just expect it
to leave the text in place when it adds the horizontal scroll bar.

If I don't specify the widths of the divs, how do I control how wide
the text is on the right-hand side of the screen? I really hate
columns of text that are wider than about 500px, but I'm not sure how
to control the layout if I don't limit the width of the text area.
How do you know how much text is contained in 500px? It could be
more or less than the amount you think is best. If you need to
specify widths, do it in ems, and/or use max-width (also specified
in ems).

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 13 '06 #4
Chris F.A. Johnson wrote:
How do you know how much text is contained in 500px? It could be
more or less than the amount you think is best. If you need to
specify widths, do it in ems, and/or use max-width (also specified
in ems).
I don't honestly care how much text is in 500px; I just know that if my
browser window is maximized to 1278px wide, I don't want text going all
the way across from one end to the other. But if the window is only
800px wide, I do want the text to take up most of the window. I tried
max-width, and it works great in Netscape, but IE6 doesn't appear to
support it.

And, yeah, ems, pixels, whatever. If I specify a width in any units,
it leads to the problem with IE shoving the text down. I'd like to
know how I can constrain the width without causing that problem in IE.

Thanks for your input. It does help clarify things.

Karen

Aug 13 '06 #5
On 13 Aug 2006 11:33:15 -0700, "Karen" <kk*******@gmail.comwrote:
>... I'd like to
know how I can constrain the width without causing that problem in IE.
I don't know what the cognoscenti think of this solution but it worked
for me. See:

http://www.svendtofte.com/code/max_width_in_ie/

JGD
Aug 15 '06 #6
Karen wrote:
Chris F.A. Johnson wrote:
> How do you know how much text is contained in 500px? It could be
more or less than the amount you think is best. If you need to
specify widths, do it in ems, and/or use max-width (also specified
in ems).

I don't honestly care how much text is in 500px; I just know that if my
browser window is maximized to 1278px wide, I don't want text going all
the way across from one end to the other. But if the window is only
800px wide, I do want the text to take up most of the window. I tried
max-width, and it works great in Netscape, but IE6 doesn't appear to
support it.

And, yeah, ems, pixels, whatever. If I specify a width in any units,
it leads to the problem with IE shoving the text down. I'd like to
know how I can constrain the width without causing that problem in IE.
You're confusing pixels with size.
The appropriate font size is whatever the user says it is, and the
appropriate line length is best expressed in terms of font size (ems).
Eg - I have a super-duper 2000*1600 CAD/CAM monitor - I won't appreciate
you shrinking your column width down to a quarter of my screen, because
my font size is set quite large (in pixels) because my screen is very
high resolution - 1200 pixels isn't that wide.
My co-worker uses the same screen at 800*600, because she's vision
impaired, and can't easily view websites (and their images) large enough
any other way.
There's no way the same number of pixels for both of us is ever going to
be anywhere near sensible. Use ems, and we both get something reasonable.

And on the subject of usability - if you force horizontal scrolling on
small windows you make the text extremely tedious to read.

Chris
Aug 29 '06 #7

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

Similar topics

8
by: Keith Thompson | last post by:
I checked the FAQ, but didn't find an answer to this question. I also checked the O'Reilly HTML and CSS books, with a similar lack of results, though I could have missed something in the CSS book....
5
by: Analysis&Solutions | last post by:
Hey Folks: I'm probably dreaming here, but perhaps there's a way... I just gave a presentation. It's in XHTML and uses CSS for making things look nice. Right now there's a small navigation...
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
4
by: Ed | last post by:
I am building a glossary. Each letter of the alphabet has its own HTML page, and each glossary entry on the page already has a unique HTML anchor tag immediately to the left of it. I've already...
7
by: Paul Cooper | last post by:
Dear All, I am working on a piece of Javascript code that needs to detect a mouse-click, shift-click and control-click. The code is not my own - it is a part of a much larger suite of routines....
7
by: Csaba Gabor | last post by:
I'd like to detect the shift key when a button is "clicked" in Firefox/Mozilla. If the button is clicked with the mouse, no problem. However, if the onclick event is keyboard originated, then my...
4
by: Kourosh | last post by:
Is there a way to get the hight of text in a table using code?
1
by: jonathanmcdougall | last post by:
I am developing a calendar on which dates can be clicked and selected. A calendar is a table in which each day is a cell. Each cell has a unique id. By left-clicking on a date, it gets selected...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.