Re: More on position fixed

Discussion in 'HTML' started by BootNic, Aug 10, 2008.

  1. BootNic

    BootNic Guest

    On Sat, 09 Aug 2008 22:55:52 -0400
    sheldonlg <sheldonlg> wrote in:
    <>

    [snip]
    Perhaps you can give me some suggestions.

    Emulate position fixed example.

    http://tinyurl.com/5n5h6e

    Java script used to toggle display and set style top/left. The style
    top/left need not to be set with java script.

    [snip]


    --

    BootNic Sun Aug 10, 2008 12:37 am
    All my humor is based upon destruction and despair. If the whole world
    was tranquil, without disease and violence, I'd be standing on the
    breadline right in back of J. Edgar Hoover.
    *Lenny Bruce US comedian, satirist, author*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEARECAAYFAkiecHsACgkQylMUzZO6jeIQNQCeJ5RbGgPEqculMZwGxXOSPIAx
    iOUAnjFt6WIqQTA0vicHw/DJfqbdfWg+
    =11W2
    -----END PGP SIGNATURE-----
     
    BootNic, Aug 10, 2008
    #1
    1. Advertising

  2. sheldonlg wrote:
    > BootNic wrote:
    >> On Sat, 09 Aug 2008 22:55:52 -0400
    >> sheldonlg <sheldonlg> wrote in:
    >> <>
    >>
    >> [snip]
    >> Perhaps you can give me some suggestions.
    >>
    >> Emulate position fixed example.
    >> http://tinyurl.com/5n5h6e

    >
    >
    > Thanks. That worked on all three browsers. Now I have a problem
    > putting it into my real app.
    >
    > First, I put the javascript into a separate file. I also put the css
    > stuff into a css file but left the conditional code (CC) in the app
    > directly. That all still worked.
    > ===> http://www.sheldonlg.com/popup/popupLoc5.html
    >
    > Then I tried putting the CC into the css file. That no longer worked.
    > ===> http://www.sheldonlg.com/popup/popupLoc6.html
    >
    > That told me that the CC had to be in the app page and not in a linked
    > css file.
    >
    > Now, the real app that I need to fix uses an application template with
    > Smarty (I am not familiar with Smarty). It links in a css file. When I
    > put the CC into the application template (right before the </head>), I
    > got an error:
    >
    > Fatal error: Smarty error: [in application_container.tpl line 14]:
    > syntax error: unrecognized tag: position: absolute;
    > followed by a traceback dump.
    >
    > My question is, how do I get the CC into the app page in this
    > configuration?
    >
    >
    >


    Your PHP question is???

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.

    ==================
     
    Jerry Stuckle, Aug 12, 2008
    #2
    1. Advertising

  3. BootNic

    BootNic Guest

    On Mon, 11 Aug 2008 20:22:04 -0400
    sheldonlg <sheldonlg> wrote in:
    <>

    > BootNic wrote:
    > > On Sat, 09 Aug 2008 22:55:52 -0400
    > > sheldonlg <sheldonlg> wrote in:
    > > <>

    [snip]
    > Thanks. That worked on all three browsers. Now I have a problem
    > putting it into my real app.
    >
    > First, I put the javascript into a separate file. I also put the css
    > stuff into a css file but left the conditional code (CC) in the app
    > directly. That all still worked.
    > ===> http://www.sheldonlg.com/popup/popupLoc5.html
    >
    > Then I tried putting the CC into the css file. That no longer worked.
    > ===> http://www.sheldonlg.com/popup/popupLoc6.html
    >
    > That told me that the CC had to be in the app page and not in a linked
    > css file.


    Think of conditional comments as html comments. That is what they are,
    only IE sees Conditional Comments as conditional comments, all other
    browsers see them as html comments.

    So with that, html does not belong in a css file.

    The way to link an external style sheet using conditional comments:

    <!--[if IE 6]>
    <link rel=StyleSheet href="ie6.css" type="text/css">
    <![endif]-->

    > Now, the real app that I need to fix uses an application template with
    > Smarty (I am not familiar with Smarty). It links in a css file. When I
    > put the CC into the application template (right before the </head>), I
    > got an error:
    >
    > Fatal error: Smarty error: [in application_container.tpl line 14]:
    > syntax error: unrecognized tag: position: absolute;
    > followed by a traceback dump.
    >
    > My question is, how do I get the CC into the app page in this
    > configuration?


    I don't know what Smarty is or anything about it.

    I suggest you try the above example of the conditional comment with the
    link element.

    If that fails, perhaps a server side include or php print.


    --

    BootNic Mon Aug 11, 2008 08:58 pm
    Nothing is stronger than habit.
    *Ovid*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEARECAAYFAkig4FkACgkQylMUzZO6jeIvnwCghxoqmFFNnIzzIqygs+oRSIZt
    HfoAnRt8pBWWc1a9+wYCOcUiRzEH7yh8
    =TbSy
    -----END PGP SIGNATURE-----
     
    BootNic, Aug 12, 2008
    #3
  4. sheldonlg wrote:
    > Jerry Stuckle wrote:
    >> sheldonlg wrote:
    >>> BootNic wrote:
    >>>> On Sat, 09 Aug 2008 22:55:52 -0400
    >>>> sheldonlg <sheldonlg> wrote in:
    >>>> <>
    >>>>
    >>>> [snip]
    >>>> Perhaps you can give me some suggestions.
    >>>>
    >>>> Emulate position fixed example.
    >>>> http://tinyurl.com/5n5h6e
    >>>
    >>>
    >>> Thanks. That worked on all three browsers. Now I have a problem
    >>> putting it into my real app.
    >>>
    >>> First, I put the javascript into a separate file. I also put the css
    >>> stuff into a css file but left the conditional code (CC) in the app
    >>> directly. That all still worked.
    >>> ===> http://www.sheldonlg.com/popup/popupLoc5.html
    >>>
    >>> Then I tried putting the CC into the css file. That no longer worked.
    >>> ===> http://www.sheldonlg.com/popup/popupLoc6.html
    >>>
    >>> That told me that the CC had to be in the app page and not in a
    >>> linked css file.
    >>>
    >>> Now, the real app that I need to fix uses an application template
    >>> with Smarty (I am not familiar with Smarty). It links in a css
    >>> file. When I put the CC into the application template (right before
    >>> the </head>), I got an error:
    >>>
    >>> Fatal error: Smarty error: [in application_container.tpl line 14]:
    >>> syntax error: unrecognized tag: position: absolute;
    >>> followed by a traceback dump.
    >>>
    >>> My question is, how do I get the CC into the app page in this
    >>> configuration?
    >>>
    >>>
    >>>

    >>
    >> Your PHP question is???

    >
    > From http://en.wikipedia.org/wiki/Smarty
    >
    > "Smarty is a web template system written in PHP."
    >
    > Since my error is in Smarty, and I researched and found the above line,
    > I added comp.lang.php to the other two groups.
    >
    > Now I will repeat my question:
    >
    > "My question is, how do I get the CC into the app page in this
    > configuration (and for Jerry: which fails in Smarty)?"
    >
    >
    >


    So? Both Windows and Linux were written in C. By your logic, Windows
    and Linux administrative and usage questions should be asked in a C
    programmers group.

    If you have Smarty questions, ask in the Smarty support forums.

    I repeat. What is your PHP question?

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.

    ==================
     
    Jerry Stuckle, Aug 12, 2008
    #4
  5. sheldonlg wrote:
    > Jerry Stuckle wrote:
    >> sheldonlg wrote:
    >>> Jerry Stuckle wrote:
    >>>> sheldonlg wrote:
    >>>>> BootNic wrote:
    >>>>>> On Sat, 09 Aug 2008 22:55:52 -0400
    >>>>>> sheldonlg <sheldonlg> wrote in:
    >>>>>> <>
    >>>>>>
    >>>>>> [snip]
    >>>>>> Perhaps you can give me some suggestions.
    >>>>>>
    >>>>>> Emulate position fixed example.
    >>>>>> http://tinyurl.com/5n5h6e
    >>>>>
    >>>>>
    >>>>> Thanks. That worked on all three browsers. Now I have a problem
    >>>>> putting it into my real app.
    >>>>>
    >>>>> First, I put the javascript into a separate file. I also put the
    >>>>> css stuff into a css file but left the conditional code (CC) in the
    >>>>> app directly. That all still worked.
    >>>>> ===> http://www.sheldonlg.com/popup/popupLoc5.html
    >>>>>
    >>>>> Then I tried putting the CC into the css file. That no longer worked.
    >>>>> ===> http://www.sheldonlg.com/popup/popupLoc6.html
    >>>>>
    >>>>> That told me that the CC had to be in the app page and not in a
    >>>>> linked css file.
    >>>>>
    >>>>> Now, the real app that I need to fix uses an application template
    >>>>> with Smarty (I am not familiar with Smarty). It links in a css
    >>>>> file. When I put the CC into the application template (right
    >>>>> before the </head>), I got an error:
    >>>>>
    >>>>> Fatal error: Smarty error: [in application_container.tpl line 14]:
    >>>>> syntax error: unrecognized tag: position: absolute;
    >>>>> followed by a traceback dump.
    >>>>>
    >>>>> My question is, how do I get the CC into the app page in this
    >>>>> configuration?
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>> Your PHP question is???
    >>>
    >>> From http://en.wikipedia.org/wiki/Smarty
    >>>
    >>> "Smarty is a web template system written in PHP."
    >>>
    >>> Since my error is in Smarty, and I researched and found the above
    >>> line, I added comp.lang.php to the other two groups.
    >>>
    >>> Now I will repeat my question:
    >>>
    >>> "My question is, how do I get the CC into the app page in this
    >>> configuration (and for Jerry: which fails in Smarty)?"
    >>>
    >>>
    >>>

    >>
    >> So? Both Windows and Linux were written in C. By your logic, Windows
    >> and Linux administrative and usage questions should be asked in a C
    >> programmers group.
    >>
    >> If you have Smarty questions, ask in the Smarty support forums.
    >>
    >> I repeat. What is your PHP question?
    >>

    >
    > The last post in any of the three Smarty forums was on Jan 4. Not much
    > chance of getting an answer there!
    >
    > So, Jerry, bitch all you want, but I will still post it here, as this,
    > and the alt.html and comp.lang.javascript, are my best shots at reaching
    > someone who knows about Smarty and can help me -- whether or not it is
    > strictly on topic.
    >


    And you'll continue to prove you're a clueless idiot.

    You didn't even try the smarty support forums, did you.

    And I'll keep telling you this is not the place to ask such questions.
    Notice how many people are answering you? That should be your second clue.



    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.

    ==================
     
    Jerry Stuckle, Aug 12, 2008
    #5
  6. BootNic

    BootNic Guest

    On Mon, 11 Aug 2008 21:55:21 -0400
    sheldonlg <sheldonlg> wrote in:
    <>

    > BootNic wrote:
    >> On Mon, 11 Aug 2008 20:22:04 -0400
    >> sheldonlg <sheldonlg> wrote in:
    >> <>
    >>
    >>> BootNic wrote:
    >>>> On Sat, 09 Aug 2008 22:55:52 -0400
    >>>> sheldonlg <sheldonlg> wrote in:
    >>>> <>

    >> [snip]
    >>> Thanks. That worked on all three browsers. Now I have a problem
    >>> putting it into my real app.
    >>>
    >>> First, I put the javascript into a separate file. I also put the css
    >>> stuff into a css file but left the conditional code (CC) in the app
    >>> directly. That all still worked.
    >>> ===> http://www.sheldonlg.com/popup/popupLoc5.html
    >>>
    >>> Then I tried putting the CC into the css file. That no longer worked.
    >>> ===> http://www.sheldonlg.com/popup/popupLoc6.html
    >>>
    >>> That told me that the CC had to be in the app page and not in a linked
    >>> css file.

    >>
    >> Think of conditional comments as html comments. That is what they are,
    >> only IE sees Conditional Comments as conditional comments, all other
    >> browsers see them as html comments.
    >>
    >> So with that, html does not belong in a css file.
    >>
    >> The way to link an external style sheet using conditional comments:
    >>
    >> <!--[if IE 6]>
    >> <link rel=StyleSheet href="ie6.css" type="text/css">
    >> <![endif]-->

    >
    > That didn't work.


    Fix your css file. The only thing that should be in your style5.css
    file is:

    div.fixed {
    position: absolute;
    }
    html, body {
    height: 100%;
    overflow: auto;
    }

    No conditional comments and ONLY the CSS for IE 6, ONLY the CSS that
    needs to be overwritten or added for the sake of IE 6, if you do this
    correctly then your popupLoc8.html should produce the effects you
    desire.

    Conditional comments NEVER go in an external style sheet.

    --

    BootNic Mon Aug 11, 2008 11:10 pm
    Man who scratch ass should not bite fingernails.
    *Ancient Chinese Proverbs*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEARECAAYFAkig/0gACgkQylMUzZO6jeKF2QCfb1Duhror3vhP6wYBAfbG5Diq
    9B8An0Eq/HGU6NnYYFj1QQmNJFw5h93n
    =josE
    -----END PGP SIGNATURE-----
     
    BootNic, Aug 12, 2008
    #6
  7. BootNic

    BootNic Guest

    On Tue, 12 Aug 2008 08:22:33 -0400
    sheldonlg <sheldonlg> wrote in:
    <>

    > sheldonlg wrote:
    >> BootNic wrote:
    >>> On Mon, 11 Aug 2008 21:55:21 -0400
    >>> sheldonlg <sheldonlg> wrote in:
    >>> <>
    >>>
    >>>> BootNic wrote:
    >>>>> On Mon, 11 Aug 2008 20:22:04 -0400
    >>>>> sheldonlg <sheldonlg> wrote in:
    >>>>> <>
    >>>>>
    >>>>>> BootNic wrote:
    >>>>>>> On Sat, 09 Aug 2008 22:55:52 -0400
    >>>>>>> sheldonlg <sheldonlg> wrote in:
    >>>>>>> <>

    [snip]
    >>>>> <!--[if IE 6]>
    >>>>> <link rel=StyleSheet href="ie6.css" type="text/css">
    >>>>> <![endif]-->

    [snip]
    >> Thank you so much. That worked perfectly on the sample app. I put it
    >> into my actual app and it was **almost** perfect. If you could help
    >> that little more, I would be greatly appreciative.
    >>
    >> What happened in the actual app was that I could key down in the
    >> page and the fixed portion stayed fixed. However, I couldn't use a
    >> vertical scroll bar on the page. For some reason, it appeared, but
    >> only moved the entire page - including the fixed portion -- a few
    >> pixels up and down. Scrolling with arrow down, however, worked
    >> perfectly.
    >>
    >> I have put up the actual css file as style6.css. style5.css is the
    >> same in the actual and sample apps. Using these styles is
    >> popupLoc9.html in the sample app -- and it works perfectly there.

    >
    > OK, it is down to this in the actual app. Looking in the conditional
    > code (this is only a problem on IE6, BTW) it is:
    >
    > div.fixed {
    > position: absolute;
    > }
    > html, body {
    > height: 100%;
    > overflow-y: auto;
    > }


    I don't see any harm in changing overflow to overflow-y

    > If I comment out the height: 100%, then I have the vertical scroll
    > bars and they work. However, the popup does not stay in a fixed
    > position. With the height:100% in there, I can key down with the
    > popup staying in place, but the scrollbar doesn't work.
    >
    > Again, my sample app works perfectly with the same css files. (It is
    > impossible to give a pointer to actual app).


    If the css is working in the sample, it's not very likely to be the
    issue in the real app

    [snip]
    > For reference, in the Smarty template, the conditional code for IE6 is
    > pulled in like this:
    >
    > {literal}
    > <!--[if IE 6]>
    > <link rel=StyleSheet href="css/IE6fixed.css" type="text/css">
    > <![endif]-->
    > {/literal}


    From what you have described here, I would GUESS that IE6fixed.css file
    is not loading. Another GUESS is that the path is incorrect, unless you
    have more then one css directory.

    Check to make sure that path to the IE6fixed.css is correct. What you
    have is href="css/IE6fixed.css", I am GUESSING that it should be
    href="/css/IE6fixed.css", NOTICE the leading forward slash.
    --

    BootNic Tue Aug 12, 2008 12:04 pm
    Good communication is as stimulating as black coffee and just as hard
    to sleep after.
    *Anne Morrow Lindbergh*

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEARECAAYFAkihtIoACgkQylMUzZO6jeKgaQCcC9/Isex95+pG8Ckb1f5iyDhk
    TJMAoLm60gRULztgjLsXoAonK6vO66xm
    =EVAx
    -----END PGP SIGNATURE-----
     
    BootNic, Aug 12, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leif K-Brooks

    Position:fixed and IE/Win

    Leif K-Brooks, Jul 9, 2003, in forum: HTML
    Replies:
    2
    Views:
    451
    Leif K-Brooks
    Jul 9, 2003
  2. johnp
    Replies:
    4
    Views:
    3,676
    Toby Inkster
    May 23, 2005
  3. Michael
    Replies:
    4
    Views:
    419
    Matt Hammond
    Jun 26, 2006
  4. David Mark

    Re: More on position fixed

    David Mark, Aug 10, 2008, in forum: HTML
    Replies:
    0
    Views:
    469
    David Mark
    Aug 10, 2008
  5. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    218
    Jeff Wood
    Sep 29, 2005
Loading...

Share This Page