aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Problems with HTML 4.01 to HTML5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problems with HTML 4.01 to HTML5" Watch "Problems with HTML 4.01 to HTML5" New topic
Author

Problems with HTML 4.01 to HTML5

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Using IE8. Why would div tags widths(defined in css) change from HTML 4.01 to HTML5?

Also on a page I have two div tags one holds a table with column headers the second a table of rows(data). In HTML 4.01 the columns line up but when changed to HTML5 they do not line up. I did this so the body(data rows) could be scrolled through while keeping header row static.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Different box models.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Bear Bibeault wrote:Different box models.


Please bear with me and help me to understand.

So a div tag that is defined in css as width: 170px; in HTML4.01 is not the same width: 170px; in HTML5

Also the documentation says that the width attribule in td tag is nolonger supported in HTML5 instead use css. So if I have a table with 15 columns and the column width varies between all columns I will have to create a class for all 15 td tags? Again I am thinking about my first post where I have a header table(1 row) in a div tag and a second div tag holds data rows.

Thanks for helping me.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Steve Dyke wrote:
So a div tag that is defined in css as width: 170px; in HTML4.01 is not the same width: 170px; in HTML5

Correct

Also the documentation says that the width attribule in td tag is nolonger supported in HTML5 instead use css.

Correct.

So if I have a table with 15 columns and the column width varies between all columns I will have to create a class for all 15 td tags?

Not correct. There are many ways to address elements other than by class.

E.g. td:nth-child(5)
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Bear Bibeault wrote:Different box models.


Am I assuming correctly that HTML 4.01 includes the padding value in the width calculation and HTML5 excludes the padding value in the width calculation?
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Bear Bibeault wrote:Not correct. There are many ways to address elements other than by class.

E.g. td:nth-child(5)


I am building my data table on the fly using jstl for:each call. The rows and columns will have to de dimed while this loop runs. Can you help me to understand how this will be accomplished?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Steve Dyke wrote:
Am I assuming correctly that HTML 4.01 includes the padding value in the width calculation and HTML5 excludes the padding value in the width calculation?

Not quite. Please read some of the links. IE versus the other browsers: different interpretations in HTHL4. Even worse: depends upon nuances in the doctype.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Steve Dyke wrote:I am building my data table on the fly using jstl for:each call. The rows and columns will have to de dimed while this loop runs. Can you help me to understand how this will be accomplished?

"dimed"? dictionary.com has no entry for "dime" as a verb.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Steve Dyke wrote:
Bear Bibeault wrote:Not correct. There are many ways to address elements other than by class.

E.g. td:nth-child(5)


I am building my data table on the fly using jstl for:each call. The rows and columns will have to de dimed while this loop runs. Can you help me to understand how this will be accomplished?


My css code seems to have no effect on cell width. This is the id of my table(nomargin100RejTags).

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Bear Bibeault wrote:
Steve Dyke wrote:I am building my data table on the fly using jstl for:each call. The rows and columns will have to de dimed while this loop runs. Can you help me to understand how this will be accomplished?

"dimed"? dictionary.com has no entry for "dime" as a verb.


is dimensioned
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

As the "dimensioning" is no longer part of the markup, the JSTL loop simply creates the elements. Any sizing is specified by CSS created elsewhere.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

Is the browser CSS3 compliant? Most modern browsers understand nth-child. Legacy browsers do not.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Bear Bibeault wrote:Is the browser CSS3 compliant? Most modern browsers understand nth-child. Legacy browsers do not.


I am using IE8. Is there another solution if IE8 will not support?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61424
    
  67

You could always resort to class names for legacy browsers.

I'm lucky in that all of the sites I'm currently working on are "must-pay" sites, rather than "please visit me" sites, so I can say:
  • Pay money to use the site (not to me, unfortunately)
  • Use a modern browser or go away

  • Steve Dyke
    Ranch Hand

    Joined: Nov 16, 2004
    Posts: 1466
        
        1
    Bear Bibeault wrote:You could always resort to class names for legacy browsers.

    I'm lucky in that all of the sites I'm currently working on are "must-pay" sites, rather than "please visit me" sites, so I can say:
  • Pay money to use the site (not to me, unfortunately)
  • Use a modern browser or go away



  • I understand but I work for a company that lags behind in a lot of respects. Any way I found a solution I thought but I can not get this to work either. As soon as my web app loads in goes to Page Not Found.

    CSS code entry:



    This is supposed to make IE CSS3 compliant.
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 61424
        
      67

    Haven't used that myself, so can't comment.
    Steve Dyke
    Ranch Hand

    Joined: Nov 16, 2004
    Posts: 1466
        
        1
    Bear Bibeault wrote:Haven't used that myself, so can't comment.


    One more question about lining up two table columns. The first table in header, the second is data rows which has overflow set. How do I compensate for column alignment when scroll bar appears? The tables are set to width: 100%.
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 61424
        
      67

    That's gonna be a tough one because scroll bar placement, width, and even existence depends on platform and browser.
    Eric Pascarello
    author
    Rancher

    Joined: Nov 08, 2001
    Posts: 15376
        
        6
    Steve Dyke wrote:
    Bear Bibeault wrote:Haven't used that myself, so can't comment.


    One more question about lining up two table columns. The first table in header, the second is data rows which has overflow set. How do I compensate for column alignment when scroll bar appears? The tables are set to width: 100%.


    As a guy that wrote code like that it is not easy. Why don't you use something like jqGrid?

    Eric
    Steve Dyke
    Ranch Hand

    Joined: Nov 16, 2004
    Posts: 1466
        
        1
    Eric Pascarello wrote:

    As a guy that wrote code like that it is not easy. Why don't you use something like jqGrid?

    Eric


    I will look into that, thanks. I am really at a great disadvantage because I know so little ablout java codeing(web apps) but I have been given these great tasks and am learning as I go. For what it is worth here I am a strong believer in God and I pray for His divine help everyday. It may not look like it but it does work. Somehow I have a 1600+ file web app(structure only) that 800+ users access read and write data to remote data server everyday. Besides my divine help I rely heavely on you guys and your vast knowledge to lead me where I need to go. Just have patience with me and I will learn.
    Eric Pascarello
    author
    Rancher

    Joined: Nov 08, 2001
    Posts: 15376
        
        6
    800 users? Small fish

    Eric
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Problems with HTML 4.01 to HTML5