SitePoint Sponsor

User Tag List

Page 6 of 6 FirstFirst ... 23456
Results 126 to 135 of 135
  1. #126
    Non-Member
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    I didn't say CSS with tables I said CSS tables - table commands in CSS. You have not been using CSS tables at all if that is what you are using since that is HTML and not CSS. It is an HTML table.

    CSS tables use such properties as display:table, display:table-row, and display:table-cell in the CSS to style <div> tags and semantic HTML elements - there is no table tag in the HTML when you use CSS tables.

    Here's an example of a CSS table.

    Code:
    <style type="text/css">
    body, html {height: 100&#37;;text-align:center;}
    #tbl {margin:0 auto;width:200px;text-align:left;}
    #tbl[id] {display: table; height: 100%;}
    #cell[id] {display: table-cell; vertical-align: middle;}
    </style>
    and

    Code:
    <div id="tbl"><div id="cell">
    content dead centre of the page using a CSS table for layout
    </div></div>
    Works in Firefox, Opera, Safari, Chrome, Mozilla, Konqueror, IE8 etc but not in IE7 or IE6.

    ps. I can get IE6 to create the equivalent layout using negative percentage offsets but can't figure out how to get IE7 to behave the same way as the -50% takes it back half the page height rather than half the element height - does anyone have a solution that will fix it for IE7?

    Code:
    <!--[if lte IE 6]><style type="text/css">
    #tbl {position: absolute; top: 50%;}
    #cell {position: relative; top: -50%;left: -50%;}
    </style><![endif]-->
    Mate.. mate.. no.

    *shakes head*

    ...no. Really.

    *shakes head (again)*

    No..

  2. #127
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,813
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by MrLeN View Post
    Mate.. mate.. no.

    *shakes head*

    ...no. Really.

    *shakes head (again)*

    No..
    I don't understand your comment. The book that has been referred to in the recent posts in this thread is talking about using CSS tables for layout. There has been no change of opinion on anyone's part that the CSS should define the layout and that using tables in the HTML in order to specify the layout is therefore a bad idea.

    By using tables in the CSS to define the layout to use for on the screen you can still use a totally different layout for those viewing the page from their mobile phone. You can't do that with <table> but you can with display:table
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #128
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    C'mon people, don't feed the troll.
    Birnam wood is come to Dunsinane

  4. #129
    Non-Member
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    I don't understand your comment. The book that has been referred to in the recent posts in this thread is talking about using CSS tables for layout. There has been no change of opinion on anyone's part that the CSS should define the layout and that using tables in the HTML in order to specify the layout is therefore a bad idea.

    By using tables in the CSS to define the layout to use for on the screen you can still use a totally different layout for those viewing the page from their mobile phone. You can't do that with <table> but you can with display:table
    That ain't what the videos says..

  5. #130
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    The video and marketing are misleading. Besides they are trying to market the book. If anything using the techniques discussed within the book are more semantic because they allow one to cut down on wrapping elements due to anonymous creation. Still its probably going to be a while before I feel comfortable relying on some of those techniques.

  6. #131
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,813
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There was similar marketing hype about Ajax a couple of years ago even though it had been supported by some browsers for 10 years. The marketing hype doesn't indicate a new product, it just indicates that someone wans to make some money out of an existing one.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #132
    Non-Member
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tables are not a design element. They are a container, just like a div.

    A CSS layout involves Div(s)and/orTable(s)/CSS

    That's what the video says.

    That's what I've been trying to get into people's thick heads for a very long time

    I know that's not what W3C thinks, but they're not the authority.

    What works is the authority.

  8. #133
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    The W3C thinks correctly about the table element. Using the css table properties isn't spoken against by the W3C because it doesn't cause the same problems that the HTML tag does.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #134
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,813
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The CSS table properties work fine in all modern browsers including IE8. It is only where you need to support old non-standard browsers such as IE6 and IE7 that you need to provide alternative CSS.

    If you are coding XHTML rather than HTML you don't have a problem at all as all browsers that support XHTML also support the CSS table properties.

    The W3C is the authority that those creating the browsers are supposed to follow in what their browsers can and can't do. Without that authority each browser would require its own proprietary code rather than all of them understanding most of what the W3C standard specifies. The W3C never has been the authority for people creating web pages except that since the browsers are supposed to follow the standards, following the same standards in your web page is a good place to start. Of course there are lots of standards you need for writing web pages that the W3C doesn't cover because their standards are aimed at the browser writers.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  10. #135
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Tables are not a design element. They are a container, just like a div.

    A CSS layout involves Div(s)and/orTable(s)/CSS

    That's what the video says.

    That's what I've been trying to get into people's thick heads for a very long time

    I know that's not what W3C thinks, but they're not the authority.

    What works is the authority.
    Your missing the point… the table tag isn't used. The display property for tables is inside the css. This forces elements that wouldn't normally behave like tables to behave like tables, but they aren't tables actually.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •