Newbie question: Formatting JSPs for different browser settings

R

Re_endian_miss

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.
 
E

Edwin Martin

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
 
K

kaeli

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

--
 
J

John C. Bollinger

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top