ie expression ( CSS )


Go Back   Computer Help Articles > Internet Explorer 6
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-05-2006, 04:21 PM
Kyong Kwak
 
Posts: n/a
Default ie expression ( CSS )


I'm having a problem setting the expression to mimic "min-width"..
( first off, is this the right newsgroup? )

I'm trying to set a "select" and css syntax ( external file ) is:

select.setDDLWidth {
width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
}

now the problem is that it is fickle.. sometimes it works and sometimes
it doesn't. I'm using .aspx with viewstate on and such.. it seems that
the problem usually occurs when I'm posting back with data. I tried to see
if the width was set somehow but I didn't see anything.

the result is that it is fixed to 200px.

so on load it's set to "auto" because the content is.. say.. 400px..
when I post back.. it's set to "200px".. so it's clipping..

tell me what I'm missing here!! thanks a bunch!


Reply With Quote
  #2  
Old 01-05-2006, 04:21 PM
Rob Parsons
 
Posts: n/a
Default Re: ie expression ( CSS )

Hi Kyong,

Here is a modified java code snippet originally from Folder.htt that is
called in the document.load event

<script language="javascript">
<!--
function Resize() {
if (document.body.clientWidth < Panel.style.pixelWidth * 2) {
Panel.style.visibility = "hidden";
ViewCtlFolder.style.pixelLeft = 0;
} else {
Panel.style.visibility = "visible";
ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
}
ViewCtlFolder.style.pixelWidth = document.body.clientWidth -
ViewCtlFolder.style.pixelLeft
}
function Initialize(){
Panel.style.visibility = "visible";
ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
ViewCtlFolder.style.pixelWidth = document.body.clientWidth -
ViewCtlFolder.style.pixelLeft;
ViewCtlFolder.Folder='Calendar';

Resize();
}
window.onresize = Resize;

//-->
I suppose the thing to note is that it uses pixelWidth. I am not sure if
this is the cause of your problem. You may also like to try sizeing
everything in em instead of px. Note also that a User Stylesheet or User
Font settings in IE will blow your styling away if they happen to choose a
different font size from your Form!

To see what is happening during your Form callbacks try Fiddler at
http://www.fiddlertool.com

"Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
news:7bf54e653ef08c7bcd812214143@news.microsoft.co m...
>
> I'm having a problem setting the expression to mimic "min-width"..
> ( first off, is this the right newsgroup? )
>
> I'm trying to set a "select" and css syntax ( external file ) is:
>
> select.setDDLWidth {
> width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
> }
>
> now the problem is that it is fickle.. sometimes it works and sometimes
> it doesn't. I'm using .aspx with viewstate on and such.. it seems that
> the problem usually occurs when I'm posting back with data. I tried to

see
> if the width was set somehow but I didn't see anything.
>
> the result is that it is fixed to 200px.
>
> so on load it's set to "auto" because the content is.. say.. 400px..
> when I post back.. it's set to "200px".. so it's clipping..
>
> tell me what I'm missing here!! thanks a bunch!
>
>



Reply With Quote
  #3  
Old 01-05-2006, 04:21 PM
Kyong Kwak
 
Posts: n/a
Default Re: ie expression ( CSS )

Thanks Rob..

I'll be taking a look at the tool ( at first glance.. it seems very
helpful! ) in a little while.. but the comment on the pixelWidth.. I'm not
sure how to use that. Are you saying that I should use javascript? or css?
it'd be best if I used css ( and expressions for ie )..

let me know what you meant.. thank you again!


> Hi Kyong,
>
> Here is a modified java code snippet originally from Folder.htt that
> is called in the document.load event
>
> <script language="javascript">
> <!--
> function Resize() {
> if (document.body.clientWidth < Panel.style.pixelWidth *
> 2) {
> Panel.style.visibility = "hidden";
> ViewCtlFolder.style.pixelLeft = 0;
> } else {
> Panel.style.visibility = "visible";
> ViewCtlFolder.style.pixelLeft =
> Panel.style.pixelWidth;
> }
> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> -
> ViewCtlFolder.style.pixelLeft
> }
> function Initialize(){
> Panel.style.visibility = "visible";
> ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> -
> ViewCtlFolder.style.pixelLeft;
> ViewCtlFolder.Folder='Calendar';
> Resize();
> }
> window.onresize = Resize;
> //-->
> I suppose the thing to note is that it uses pixelWidth. I am not sure
> if
> this is the cause of your problem. You may also like to try sizeing
> everything in em instead of px. Note also that a User Stylesheet or
> User
> Font settings in IE will blow your styling away if they happen to
> choose a
> different font size from your Form!
> To see what is happening during your Form callbacks try Fiddler at
> http://www.fiddlertool.com
>
> "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
> news:7bf54e653ef08c7bcd812214143@news.microsoft.co m...
>
>> I'm having a problem setting the expression to mimic "min-width".. (
>> first off, is this the right newsgroup? )
>>
>> I'm trying to set a "select" and css syntax ( external file ) is:
>>
>> select.setDDLWidth {
>> width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
>> }
>> now the problem is that it is fickle.. sometimes it works and
>> sometimes it doesn't. I'm using .aspx with viewstate on and such..
>> it seems that the problem usually occurs when I'm posting back with
>> data. I tried to
>>

> see
>
>> if the width was set somehow but I didn't see anything.
>>
>> the result is that it is fixed to 200px.
>>
>> so on load it's set to "auto" because the content is.. say.. 400px..
>> when I post back.. it's set to "200px".. so it's clipping..
>>
>> tell me what I'm missing here!! thanks a bunch!
>>



Reply With Quote
  #4  
Old 01-05-2006, 04:21 PM
Rob Parsons
 
Posts: n/a
Default Re: ie expression ( CSS )

Hi Again Kyong,

Yes I suggest that you use java script instead of hardcoded styling. My
experience has been that it is uneconomic to use server side styling when
dealing with cross-browser issues. After all the User is King! The code
snippet I supplied was from Folder.htt so it is probably very solid. I feel
confident that the issue will be with the use of px i/o em as your sizing
basis.. but I could be wrong. It is up to you to do the hard work and make
the decision.

On second thoughts, after looking closely at your code, try assigning the
nowrap attribute to your containing tag. (client)

mmm. But I still think that scripting is a better option.

"Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
news:7bf54e6544b58c7bd8271ec36f3@news.microsoft.co m...
> Thanks Rob..
>
> I'll be taking a look at the tool ( at first glance.. it seems very
> helpful! ) in a little while.. but the comment on the pixelWidth.. I'm

not
> sure how to use that. Are you saying that I should use javascript? or

css?
> it'd be best if I used css ( and expressions for ie )..
>
> let me know what you meant.. thank you again!
>
>
> > Hi Kyong,
> >
> > Here is a modified java code snippet originally from Folder.htt that
> > is called in the document.load event
> >
> > <script language="javascript">
> > <!--
> > function Resize() {
> > if (document.body.clientWidth < Panel.style.pixelWidth *
> > 2) {
> > Panel.style.visibility = "hidden";
> > ViewCtlFolder.style.pixelLeft = 0;
> > } else {
> > Panel.style.visibility = "visible";
> > ViewCtlFolder.style.pixelLeft =
> > Panel.style.pixelWidth;
> > }
> > ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> > -
> > ViewCtlFolder.style.pixelLeft
> > }
> > function Initialize(){
> > Panel.style.visibility = "visible";
> > ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
> > ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> > -
> > ViewCtlFolder.style.pixelLeft;
> > ViewCtlFolder.Folder='Calendar';
> > Resize();
> > }
> > window.onresize = Resize;
> > //-->
> > I suppose the thing to note is that it uses pixelWidth. I am not sure
> > if
> > this is the cause of your problem. You may also like to try sizeing
> > everything in em instead of px. Note also that a User Stylesheet or
> > User
> > Font settings in IE will blow your styling away if they happen to
> > choose a
> > different font size from your Form!
> > To see what is happening during your Form callbacks try Fiddler at
> > http://www.fiddlertool.com
> >
> > "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
> > news:7bf54e653ef08c7bcd812214143@news.microsoft.co m...
> >
> >> I'm having a problem setting the expression to mimic "min-width".. (
> >> first off, is this the right newsgroup? )
> >>
> >> I'm trying to set a "select" and css syntax ( external file ) is:
> >>
> >> select.setDDLWidth {
> >> width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
> >> }
> >> now the problem is that it is fickle.. sometimes it works and
> >> sometimes it doesn't. I'm using .aspx with viewstate on and such..
> >> it seems that the problem usually occurs when I'm posting back with
> >> data. I tried to
> >>

> > see
> >
> >> if the width was set somehow but I didn't see anything.
> >>
> >> the result is that it is fixed to 200px.
> >>
> >> so on load it's set to "auto" because the content is.. say.. 400px..
> >> when I post back.. it's set to "200px".. so it's clipping..
> >>
> >> tell me what I'm missing here!! thanks a bunch!
> >>

>
>



Reply With Quote
  #5  
Old 01-05-2006, 04:22 PM
Kyong Kwak
 
Posts: n/a
Default Re: ie expression ( CSS )

Hello Rob,

I tried the "noWrap" option to little avail.. I will script it and see if
that works.. thank you again! Have a wonderful thanksgiving!! ( if you're
in the states.. )

> Hi Again Kyong,
>
> Yes I suggest that you use java script instead of hardcoded styling.
> My experience has been that it is uneconomic to use server side
> styling when dealing with cross-browser issues. After all the User is
> King! The code snippet I supplied was from Folder.htt so it is
> probably very solid. I feel confident that the issue will be with the
> use of px i/o em as your sizing basis.. but I could be wrong. It is up
> to you to do the hard work and make the decision.
>
> On second thoughts, after looking closely at your code, try assigning
> the nowrap attribute to your containing tag. (client)
>
> mmm. But I still think that scripting is a better option.
>
> "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
> news:7bf54e6544b58c7bd8271ec36f3@news.microsoft.co m...
>
>> Thanks Rob..
>>
>> I'll be taking a look at the tool ( at first glance.. it seems very
>> helpful! ) in a little while.. but the comment on the pixelWidth..
>> I'm
>>

> not
>
>> sure how to use that. Are you saying that I should use javascript?
>> or
>>

> css?
>
>> it'd be best if I used css ( and expressions for ie )..
>>
>> let me know what you meant.. thank you again!
>>
>>> Hi Kyong,
>>>
>>> Here is a modified java code snippet originally from Folder.htt that
>>> is called in the document.load event
>>>
>>> <script language="javascript">
>>> <!--
>>> function Resize() {
>>> if (document.body.clientWidth < Panel.style.pixelWidth *
>>> 2) {
>>> Panel.style.visibility = "hidden";
>>> ViewCtlFolder.style.pixelLeft = 0;
>>> } else {
>>> Panel.style.visibility = "visible";
>>> ViewCtlFolder.style.pixelLeft =
>>> Panel.style.pixelWidth;
>>> }
>>> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
>>> -
>>> ViewCtlFolder.style.pixelLeft
>>> }
>>> function Initialize(){
>>> Panel.style.visibility = "visible";
>>> ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
>>> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
>>> -
>>> ViewCtlFolder.style.pixelLeft;
>>> ViewCtlFolder.Folder='Calendar';
>>> Resize();
>>> }
>>> window.onresize = Resize;
>>> //-->
>>> I suppose the thing to note is that it uses pixelWidth. I am not
>>> sure
>>> if
>>> this is the cause of your problem. You may also like to try sizeing
>>> everything in em instead of px. Note also that a User Stylesheet or
>>> User
>>> Font settings in IE will blow your styling away if they happen to
>>> choose a
>>> different font size from your Form!
>>> To see what is happening during your Form callbacks try Fiddler at
>>> http://www.fiddlertool.com
>>> "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
>>> news:7bf54e653ef08c7bcd812214143@news.microsoft.co m...
>>>
>>>> I'm having a problem setting the expression to mimic "min-width"..
>>>> ( first off, is this the right newsgroup? )
>>>>
>>>> I'm trying to set a "select" and css syntax ( external file ) is:
>>>>
>>>> select.setDDLWidth {
>>>> width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
>>>> }
>>>> now the problem is that it is fickle.. sometimes it works and
>>>> sometimes it doesn't. I'm using .aspx with viewstate on and such..
>>>> it seems that the problem usually occurs when I'm posting back with
>>>> data. I tried to
>>> see
>>>
>>>> if the width was set somehow but I didn't see anything.
>>>>
>>>> the result is that it is fixed to 200px.
>>>>
>>>> so on load it's set to "auto" because the content is.. say..
>>>> 400px.. when I post back.. it's set to "200px".. so it's
>>>> clipping..
>>>>
>>>> tell me what I'm missing here!! thanks a bunch!
>>>>



Reply With Quote
  #6  
Old 01-05-2006, 04:22 PM
Rob Parsons
 
Posts: n/a
Default Re: ie expression ( CSS )

Hi Kyong,
Thanks for the warm response. I hope you have success. It is hard to make
judgements when you don't have the source in your face.
No. I am Australian. Ha Ha. Its too hot here to stuff a turkey! Surfs Up M8.
"Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
news:7bf54e654ac08c7be3521059042@news.microsoft.co m...
> Hello Rob,
>
> I tried the "noWrap" option to little avail.. I will script it and see if
> that works.. thank you again! Have a wonderful thanksgiving!! ( if

you're
> in the states.. )
>
> > Hi Again Kyong,
> >
> > Yes I suggest that you use java script instead of hardcoded styling.
> > My experience has been that it is uneconomic to use server side
> > styling when dealing with cross-browser issues. After all the User is
> > King! The code snippet I supplied was from Folder.htt so it is
> > probably very solid. I feel confident that the issue will be with the
> > use of px i/o em as your sizing basis.. but I could be wrong. It is up
> > to you to do the hard work and make the decision.
> >
> > On second thoughts, after looking closely at your code, try assigning
> > the nowrap attribute to your containing tag. (client)
> >
> > mmm. But I still think that scripting is a better option.
> >
> > "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
> > news:7bf54e6544b58c7bd8271ec36f3@news.microsoft.co m...
> >
> >> Thanks Rob..
> >>
> >> I'll be taking a look at the tool ( at first glance.. it seems very
> >> helpful! ) in a little while.. but the comment on the pixelWidth..
> >> I'm
> >>

> > not
> >
> >> sure how to use that. Are you saying that I should use javascript?
> >> or
> >>

> > css?
> >
> >> it'd be best if I used css ( and expressions for ie )..
> >>
> >> let me know what you meant.. thank you again!
> >>
> >>> Hi Kyong,
> >>>
> >>> Here is a modified java code snippet originally from Folder.htt that
> >>> is called in the document.load event
> >>>
> >>> <script language="javascript">
> >>> <!--
> >>> function Resize() {
> >>> if (document.body.clientWidth < Panel.style.pixelWidth *
> >>> 2) {
> >>> Panel.style.visibility = "hidden";
> >>> ViewCtlFolder.style.pixelLeft = 0;
> >>> } else {
> >>> Panel.style.visibility = "visible";
> >>> ViewCtlFolder.style.pixelLeft =
> >>> Panel.style.pixelWidth;
> >>> }
> >>> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> >>> -
> >>> ViewCtlFolder.style.pixelLeft
> >>> }
> >>> function Initialize(){
> >>> Panel.style.visibility = "visible";
> >>> ViewCtlFolder.style.pixelLeft = Panel.style.pixelWidth;
> >>> ViewCtlFolder.style.pixelWidth = document.body.clientWidth
> >>> -
> >>> ViewCtlFolder.style.pixelLeft;
> >>> ViewCtlFolder.Folder='Calendar';
> >>> Resize();
> >>> }
> >>> window.onresize = Resize;
> >>> //-->
> >>> I suppose the thing to note is that it uses pixelWidth. I am not
> >>> sure
> >>> if
> >>> this is the cause of your problem. You may also like to try sizeing
> >>> everything in em instead of px. Note also that a User Stylesheet or
> >>> User
> >>> Font settings in IE will blow your styling away if they happen to
> >>> choose a
> >>> different font size from your Form!
> >>> To see what is happening during your Form callbacks try Fiddler at
> >>> http://www.fiddlertool.com
> >>> "Kyong Kwak" <kyongkwak@nospam.nospam> wrote in message
> >>> news:7bf54e653ef08c7bcd812214143@news.microsoft.co m...
> >>>
> >>>> I'm having a problem setting the expression to mimic "min-width"..
> >>>> ( first off, is this the right newsgroup? )
> >>>>
> >>>> I'm trying to set a "select" and css syntax ( external file ) is:
> >>>>
> >>>> select.setDDLWidth {
> >>>> width: expression( ( this.clientWidth <= 200 ) ? "200px" : "auto";
> >>>> }
> >>>> now the problem is that it is fickle.. sometimes it works and
> >>>> sometimes it doesn't. I'm using .aspx with viewstate on and such..
> >>>> it seems that the problem usually occurs when I'm posting back with
> >>>> data. I tried to
> >>> see
> >>>
> >>>> if the width was set somehow but I didn't see anything.
> >>>>
> >>>> the result is that it is fixed to 200px.
> >>>>
> >>>> so on load it's set to "auto" because the content is.. say..
> >>>> 400px.. when I post back.. it's set to "200px".. so it's
> >>>> clipping..
> >>>>
> >>>> tell me what I'm missing here!! thanks a bunch!
> >>>>

>
>



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Off Topic, but I wonder if anyone can help? Andrew Bailey Windows XP Customize 7 01-05-2006 06:34 AM


All times are GMT. The time now is 11:17 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 2.3.2 © 2005, Crawlability, Inc.

ie expression ( CSS )