0

IE6 Listbox font size is too big

asked 2010-04-15 07:10:35 +0800

tvella gravatar image tvella
87 3

Hi,

I have been running the v5.0.1 zkdemo and found a IE6 styling problem with the Listbox component (mold="select") in the "Various Form" demo page. The font size is almost 2 times larger than the fonts used in all the other components on the page.

I can confirm the same behavior in my ZK application when using the same browser.

The problem occurs using IE6 (version 6.0.2800.1106) running on a windows 2000 client (version 5.0 build 2195 - service pack 4)

I've tried putting this in my css:

select {
font-size: 50%! important;
}

But IE6 appears to ignore it.

This problem does not occur when using IE7, IE8, FF3 ad FF3.5

Any advice would be appreciated.
Thanks,
Trevor

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2010-04-15 07:25:07 +0800

iantsai gravatar image iantsai
2755 1

you can set your own zclass by <listbox zclass="mySelect" />, and declare your own "mySelect" in a <style>, please take a look at this article to know how to use zclass.

link publish delete flag offensive edit

answered 2010-04-15 07:44:30 +0800

tvella gravatar image tvella
87 3

Thank you iantsai,

I have read the article that you referred me to.

How can I make this zclass tweak for IE6 only? It works on all other browsers.

link publish delete flag offensive edit

answered 2010-04-16 03:26:46 +0800

iantsai gravatar image iantsai
2755 1

How about this?


.ie6 select {
...
}

link publish delete flag offensive edit

answered 2010-04-16 08:22:34 +0800

tvella gravatar image tvella
87 3

That worked!
Thank you iantsai

link publish delete flag offensive edit

answered 2010-04-16 10:18:16 +0800

tvella gravatar image tvella
87 3

I spoke too soon.

The font size adjusted correctly but now I get this strange problem where I press on the down arrow of a select box and the contents to the drop down list is not rendered. I get a blank line similar to this image:

http://queen3.at.tut.by/DropDownIE6jQuery.PNG

The bizarre thing is that it only affects some select boxes. For example I have select boxes in another grid which seem to be behaving properly, while others in another grid don't

I tried setting the height to a minimal value thinking that is was a classic IE6 hasLayout problem, but no luck:
.ie6 select {
font-size: 100%! important;
height: 1%
}

If I remove the above CSS statement block, then the drop down boxes behave correctly, but it takes me back to my original problem where the font size is twice that of all the data displayed in my ZK window.

Do you have any thoughts?

link publish delete flag offensive edit

answered 2010-04-18 20:45:26 +0800

iantsai gravatar image iantsai
2755 1

hmm... sorry I can't see your screen, but I have another solution.

1. create a file which will be used to contain CSS with extension *.css.dsp.

2. place it in your web archive, and inside of it, please write:

<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
<c:if test="c:browser('ie6-')">
select {
...
}
</c:if>

3. link this file to your page.

link publish delete flag offensive edit

answered 2010-04-21 06:51:56 +0800

tvella gravatar image tvella
87 3

updated 2010-04-21 07:49:55 +0800

I tried that but still no luck. The fonts didn't even change this time.

Heres what I put in my new CSS file called: ie6.css.dsp

---------------------------------------------------------
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
<c:if test="c:browser('ie6-')">
select {
font-size: 70%! important;
}
</c:if>

---------------------------------------------------------

Here's what I put in my index.zul page

---------------------------------------------------------
<style src="css/ie6.css.dsp"/>
---------------------------------------------------------

As I was trying to reduce the font size I noticed that my FF browser was behaving weirdly. Some select boxes were adhering the the new font sizes, while others ignored them. I hope to send you a file that you can run on your side to reproduce this behavior next week.

link publish delete flag offensive edit

answered 2010-04-21 20:33:23 +0800

iantsai gravatar image iantsai
2755 1

waiting for your case.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-15 07:10:35 +0800

Seen: 1,070 times

Last updated: Apr 21 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More