*
The moose likes HTML, CSS and JavaScript and the fly likes layout and multibrowser hell Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "layout and multibrowser hell" Watch "layout and multibrowser hell" New topic
Author

layout and multibrowser hell

Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Hello all,

i seem to have a "big problem" / challenge. I coded a struts application without declaring a HTML doctype. I continuously checked the page in Internet explorer. Now i checked to see if it all looked ok... Well you guessed right it doesn't look ok at all. If i declare to use the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> it doesn't look to swell in internet explorer anymore.

So here's the source code :


I use the following javascript :

This js is executed onLoad but ihad to remove it because of the restrictions.



If you remove the html doctype declaration it all look better in ie. In firefox it all looks crap.

Can anybody help me out??
[ March 08, 2005: Message edited by: Ricardo Estafan ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
CSS? can not fix the css if I can not see the external file...
Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Ok sorry about that here's the css :



Thanks a lot for your help!!
Balan Raj
Ranch Hand

Joined: Aug 26, 2003
Posts: 74
Get IE to work in the "quirk mode"

Add a comment in the top of your page.. (It shud be the first line)

something like
<!-- my page -->
then continue with the rest of your JSP
<doctype .. You can make this strict

hth :roll:
Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
what do you mean by hth?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
hth - hope that helps

I have been busy, will try to look at it this morning.
Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Here are problems...








There are still other problems with the layout position vertically in the cell.

This is what you need to do in the future. Add one style sheet rule code at at time and seem if it does the same thing in each browser. If not comment out the lines in that section and see what causes it. Example would be just do the body, then do the next section, until you get to the end.

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I personally say just the table layout and do it all with css. You should only use a table for the "Type Artist Title Label Euro " section. And divs/spans for the rest, but that is tons of work which I doubt you would want to do at this time.

Eric
Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Ok Eric thanks a lot. I guess this means a total redesign...

Could you give me a simple headstart which i can work on?

can i keep using the javascript in order to make only the right side scrollable if it contains more than the window can display?

Thanks for your help!!!

Does your book also contain javascript examples like i plucked somewhere from the web for the scrollable area etc.?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It really does not mean total redesign. You can stick with a table layout, but it is hard to get them to look right. That is the trouble you are having. You can feel free to use JavaScript on your page. You could also use a div that auto scrolls.

<div style="overflow:auto;width:200px;height:200px">
</div>

When the content gets large it adds scrollbars. I do not know what your JavaScript code is exactly, but I don;t think that is in my book.

My book mainly deals with all of the fundamental operations in JavaScript and how to use them. There is some code in there on making menus and stuff. My book is a great reference in my mond. I wrote it and I use it to look stuff up when syntax escapes my mind!

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I will try to post a basic 2 column layout here sometime within the next few hours. I need to get home from work.

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://www.ssi-developer.net/main/templates/

There are some two column layouts there..

Eric
Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Ok Eric,

i've fixed the two column page. I'll add the code i used for a test page. I have a question this page works fine in Mozialla. In IE it adds scrollbar to the left of the right end of the page. Now i hope you or anyone else can help me fixing this. It's just a simple two column page. Left column is the navigation column, i want this to be fixed (in all browsers ;-).

CSS:

HTML :


Thanks a lot!!!

[ March 13, 2005: Message edited by: Ricardo Estafan ]

[ March 14, 2005: Message edited by: Ricardo Estafan ]
[ March 14, 2005: Message edited by: Ricardo Estafan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: layout and multibrowser hell
 
Similar Threads
document.forms[0].submit(); throws Invalid Argument in IE
Caching rendered html in jsp
Getting search results on same search page
spaces while populating using s:iterator
iterate problem in struts2