Newbie question: Formatting JSPs for different browser settings

Discussion in 'Java' started by Re_endian_miss@yahoo.com, Mar 16, 2005.

  1. Guest

    I am new to JSP/Struts/J2EE development and wanted to know if the good
    and knowledgeable (and might I add SO very good looking) people on this
    board could point me in the right direction.

    I created some JSPs that looked great in IE using "typical" settings.
    Then, one of my users looked at the JSPs but with her Favorites/Links
    open as a "sticky" side window, and another with different settings
    (which, I don't know yet), and the screens looked terrible, e.g.
    presentation elements truncated without scroll bars provided, windows
    looking poorly shaped with regards to their content.

    So, in general, (can and) how does one create JSPs that look good
    regardless of the browser settings? (fyi: Fortunately, I only have to
    deal with users with IE for now.)

    Thanks in advance for any advice.
    , Mar 16, 2005
    #1
    1. Advertising

  2. Edwin Martin Guest

    wrote:

    > I am new to JSP/Struts/J2EE development and wanted to know if the good
    > and knowledgeable (and might I add SO very good looking) people on this
    > board could point me in the right direction.


    Very good looking? Hmm, thanks.

    > I created some JSPs that looked great in IE using "typical" settings.
    > Then, one of my users looked at the JSPs but with her Favorites/Links
    > open as a "sticky" side window, and another with different settings
    > (which, I don't know yet), and the screens looked terrible, e.g.
    > presentation elements truncated without scroll bars provided, windows
    > looking poorly shaped with regards to their content.


    I guess you used HTML in your JSP page? I think your HTML (and possibly
    CSS) is not of good quality.

    Pages which adjust their sizes with the size of the browser window have
    a so called "liquid layout".

    You might want to learn more about it:

    http://www.google.nl/search?q=html liquid layout

    Edwin Martin

    --
    http://www.bitstorm.org/
    Edwin Martin, Mar 16, 2005
    #2
    1. Advertising

  3. kaeli Guest

    In article <>,
    enlightened us with...
    > I created some JSPs that looked great in IE using "typical" settings.
    > Then, one of my users looked at the JSPs but with her Favorites/Links
    > open as a "sticky" side window, and another with different settings
    > (which, I don't know yet), and the screens looked terrible, e.g.
    > presentation elements truncated without scroll bars provided, windows
    > looking poorly shaped with regards to their content.
    >


    Has nothing to do with the JSP, unless you're using some libraries I don't
    know about that generate all the html for you.
    It's the HTML generated by the JSP that the browser sees. It doesn't know
    jack about java.

    I bet you didn't even use a doctype, thus throwing IE into quirks mode. I
    hope none of your visitors will be using Firefox. *heh*
    Actually, I bet you used an html generator.

    Learn HTML. THEN do JSP.
    Some quick tips based on what you said here:
    Don't use absolute font sizes (pixels). Don't use absolutely positioned divs
    without overflow set to scroll or auto. Actually, most of the time,
    absolutely positioned divs suck anyway for just this sort of reason. If the
    user changes their font size (which they better be able to do) it completely
    fudges the layout.

    HTH

    --
    --
    ~kaeli~
    When two egotists meet, it's an I for an I.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Mar 17, 2005
    #3
  4. wrote:

    > I am new to JSP/Struts/J2EE development and wanted to know if the good
    > and knowledgeable (and might I add SO very good looking) people on this

    ---------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Well that leaves me out, but perhaps I can give you something anyway.

    > board could point me in the right direction.
    >
    > I created some JSPs that looked great in IE using "typical" settings.
    > Then, one of my users looked at the JSPs but with her Favorites/Links
    > open as a "sticky" side window, and another with different settings
    > (which, I don't know yet), and the screens looked terrible, e.g.
    > presentation elements truncated without scroll bars provided, windows
    > looking poorly shaped with regards to their content.
    >
    > So, in general, (can and) how does one create JSPs that look good
    > regardless of the browser settings? (fyi: Fortunately, I only have to
    > deal with users with IE for now.)


    JSPs generally produce HTML code that browsers then render. The
    appearance in the browser depends on the HTML, the browser, and any
    other relevant resources such as stylesheets. When it renders the page,
    the browser neither knows nor cares how it was generated -- static HTML,
    JSP, servlet, or online monkey pool, it's all the same to the browser.

    The long and the short of it, therefore, is figure out how the HTML
    needs to be structured, then make your JSP produce the necessary HTML.
    Separating styling information from content / structure (read: "using
    only CSS for styling") usually is a step in the right direction, but is
    not a complete solution. The styling needs to be sufficiently flexible,
    too. A well-designed web page does not depend on users having "typical"
    browser settings. Specifics on HTML and CSS authoring are off-topic here.

    --
    John Bollinger
    John C. Bollinger, Mar 17, 2005
    #4
    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. Tina
    Replies:
    2
    Views:
    446
  2. Siegfried Heintze
    Replies:
    0
    Views:
    2,260
    Siegfried Heintze
    Oct 24, 2005
  3. Christian Ashby

    Pretty Printing / Code formatting for JSPs

    Christian Ashby, Aug 20, 2004, in forum: Java
    Replies:
    0
    Views:
    361
    Christian Ashby
    Aug 20, 2004
  4. donet programmer
    Replies:
    3
    Views:
    1,520
    Gregory A. Beamer
    Nov 20, 2009
  5. Guest
    Replies:
    2
    Views:
    171
    Foo Man Chew
    Dec 29, 2003
Loading...

Share This Page