SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 68 of 68
  1. #51
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's exactly right, and the more you can keep those three layers separate from one another, the better.
    Birnam wood is come to Dunsinane

  2. #52
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by AutisticCuckoo View Post
    That's exactly right, and the more you can keep those three layers separate from one another, the better.
    Talking of separation I'd like to try using Javascript for some things, a lot of things actually, and although I'm almost off topic here IE7 blocks it with a popup by default so it puts me off using JS., for equal height columns for example.

    I know JS files are meant to be linked to in the same way as style sheets (separately) but I'm sure IE7 still blocks it when I try it for equal columns.

    Is there a simple workaround for this?

    vBulletin uses JS for its drop down menus I'm sure and IE doesn't seem to block these.

    Thanks.

  3. #53
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE will block JavaScript if you open the HTML document from the local hard drive. It's a security setting. If you access the HTML document via a web server, IE won't block the script.
    Birnam wood is come to Dunsinane

  4. #54
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    IE will block JavaScript if you open the HTML document from the local hard drive. It's a security setting. If you access the HTML document via a web server, IE won't block the script.
    Great stuff I'll try this out on a live test next time then. I've been trying to use an equal height columns script as I'm still adjusting my designs and therefore can't reliably use the faux technique as my slice may change in appearance.

    Just to confirm, this works exactly as stated, the script runs fine online as opposed to locally. Not that I'm suggesting it wouldn't work or anything but it's always good to test things. Better get my JS books out...

  5. #55
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    So long as your cool with people who for whatever reason don't have JS getting a jiggeddy jaggeddy screen : )

    What you'd want is to use some technique (CSS) that works most of the time, and have the Javascript layer over it to correct for when the CSS fails (meaning those without JS will still at least get your best try).

    I've been doing that for a footer. I couldn't keep it at the bottom of the screen on IE5.5 and unreliably in IE6.... so I positioned it best I could for them with CSS, and used a CSS-Javascript Paul gave me for those with JS and those browsers on. The nice thing about CSS-Javascript is that usually we need JS for IE6 and under, and they're the only browsers (that I know of) who even look at it (though you have to comment it out before sending to the validator, or it gets an error and can't see the page).

    Depending on what's not the same size, there are quite a few equal-columns tricks out there. They need more containers and code than a simple wrapping table, but they're CSS-only. Until CSS gets its head straight about heights and vertical alignment (or until IE learns to use display: table), you're always going to need a fancy trick in CSS to get the table result.

  6. #56
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by Stomme poes View Post
    So long as your cool with people who for whatever reason don't have JS getting a jiggeddy jaggeddy screen : )

    What you'd want is to use some technique (CSS) that works most of the time, and have the Javascript layer over it to correct for when the CSS fails (meaning those without JS will still at least get your best try).

    I've been doing that for a footer. I couldn't keep it at the bottom of the screen on IE5.5 and unreliably in IE6.... so I positioned it best I could for them with CSS, and used a CSS-Javascript Paul gave me for those with JS and those browsers on. The nice thing about CSS-Javascript is that usually we need JS for IE6 and under, and they're the only browsers (that I know of) who even look at it (though you have to comment it out before sending to the validator, or it gets an error and can't see the page).

    Depending on what's not the same size, there are quite a few equal-columns tricks out there. They need more containers and code than a simple wrapping table, but they're CSS-only. Until CSS gets its head straight about heights and vertical alignment (or until IE learns to use display: table), you're always going to need a fancy trick in CSS to get the table result.
    Yes, I forgot about the JS being turned off option which wouldn't bode well for my equal height columns would it I've been looking at CSS replacements for tables' full height but I'm still not sure which one to go with, I'm sure I'll decide soon.

    I think there are a few options, I could reasonably center my page and set its height to avoid liquidity on the vertical axis, but I think I'll look into CSS specific workarounds for it. The research goes on, I can't help thinking that some sort of article detailing how to emulate or at least replace tables for layout would be a good thing. It would help to transfer the old skills and techniques into the new method of using CSS.

  7. #57
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    heh, they made one, display: table (though i haven't figured out how to "undo" the border-collapse:collapse as that seems to be the default)... but alas, IE, it exists...

    There's display: table for the main div
    display: table-row for what would act like the row (like, a horizontal menu)
    display: table-cell for the things in the table row (list items).

    They will act like tables in how their heights and widths are set and the fact that other "table cells" will adjust their height accordingly.

  8. #58
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    heh, they made one, display: table (though i haven't figured out how to "undo" the border-collapse:collapse as that seems to be the default)... but alas, IE, it exists...

    There's display: table for the main div
    display: table-row for what would act like the row (like, a horizontal menu)
    display: table-cell for the things in the table row (list items).

    They will act like tables in how their heights and widths are set and the fact that other "table cells" will adjust their height accordingly.
    I wonder, if the W3C has already introduced the means to display a table using CSS and no classic table tags does this mean that the classic tags <tr> <td> etc will be obsolete? I'm talking in a perfect world, with full CSS browser support.

    I've read that at the moment table tags are still recommended for tabular data, such as the match events in HTML Utopia, so will the new CSS methods for cells etc just be an alternative to tables, alongside their classic counterparts?

    I can't see browsers ever dropping support for all kinds of tables completely because there will still be tabular data.

  9. #59
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Er, tables are still used for tabular data, as you say, so no they won't be obsolete at all.

    It's interesting that you seem to think HTML tables are synonymous with table-layouts!

  10. #60
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by protheory View Post
    I wonder, if the W3C has already introduced the means to display a table using CSS and no classic table tags does this mean that the classic tags <tr> <td> etc will be obsolete? I'm talking in a perfect world, with full CSS browser support.
    No, no, no!

    The display:table property and its cousins are there so that you can make something that isn't a table be displayed as a table. (Of course, they are also the default display properties for the real table element types in user agent style sheets).

    Table markup, on the other hand, is for marking up content to indicate that it is a table. You could choose to display it as something else (although browser support is poor for that).

    You have to understand the distinction between markup, which says what things are, and CSS, which says how they should display.
    Birnam wood is come to Dunsinane

  11. #61
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by Stormrider View Post
    Er, tables are still used for tabular data, as you say, so no they won't be obsolete at all.

    It's interesting that you seem to think HTML tables are synonymous with table-layouts!
    Thanks, I didn't really think they would be completely obsolete I just wondered why W3C were introducing alternatives as well.

    I do tend to associate table layouts with tables because I've read a lot of articles on using full CSS for forms and emulating a table based layout for websites, organising thumbnails using CSS not tables etc, so I suppose the two just seem interchangeable to an extent.

  12. #62
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    No, no, no!

    The display:table property and its cousins are there so that you can make something that isn't a table be displayed as a table. (Of course, they are also the default display properties for the real table element types in user agent style sheets).

    Table markup, on the other hand, is for marking up content to indicate that it is a table. You could choose to display it as something else (although browser support is poor for that).

    You have to understand the distinction between markup, which says what things are, and CSS, which says how they should display.
    I see, display: table should have told me this anyway shouldn't it, seeing as it's a display attribute not a markup tag. It's unlike me not to take things literally enough but in this case I'm obviously not taking the separation seriously enough am I. I'll keep working on it. Thanks for your patience with me

  13. #63
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Patience is not an issue when someone is clearly learning, as you are. It doesn't matter if I need to explain something once, twice or ten times, as long as the message gets across eventually.

    I don't always understand new concepts the first time I encounter them, either. I doubt anyone does.

    If you don't 'get it' the problem isn't you, it's me for not explaining well enough.
    Birnam wood is come to Dunsinane

  14. #64
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by AutisticCuckoo View Post
    Patience is not an issue when someone is clearly learning, as you are. It doesn't matter if I need to explain something once, twice or ten times, as long as the message gets across eventually.

    I don't always understand new concepts the first time I encounter them, either. I doubt anyone does.

    If you don't 'get it' the problem isn't you, it's me for not explaining well enough.
    Thanks I've learnt a great deal of stuff lately and it's really opened my eyes, not just to what is possible, but more importantly to what I can achieve myself in my layouts. I'm now much more confident in my understanding of CSS positioning and general semantic coding.

    I'm off to read about the display: table property on W3C now.

  15. #65
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you find the W3C material difficult to read (I do), perhaps the section about table formatting in The Ultimate CSS Reference could be of help.
    Birnam wood is come to Dunsinane

  16. #66
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Bleh. Thanks for the link: it shows I'm doomed : )
    the border properties, but only in the collapsing borders model (see below)
    I'd been hoping for a way around that one.

    Pro, here's one really great reason why table tags won't go away: The things in tables naturally have a relationship with each other. In other HTML tags, you can only show that (and not readily); for instance, we know that in a definition list, there are groups of two things which have some sort of relationship with each other.

    However, in a table, you can use either "scope" or "headers" (or maybe in the future, axis) to say, all these certain cells belong with this header. So in a calendar made of a table, with scope=col on each of your days, then each date now has a day associated with it. A screen reader can read that out. Thursday, 16 May. HTML doesn't have anything that can get that specific.
    If axis ever gets anywhere, it would be a great addition to the whole "semantic web" thing where people can pick out certain information out of a table like you pick stuff out of a database table.

    Besides, if they were going to get rid of tables, then IE couldn't have any at all : )

  17. #67
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    If you find the W3C material difficult to read (I do), perhaps the section about table formatting in The Ultimate CSS Reference could be of help.
    You're obviously a mind reader, I found the W3C explanation cryptic and lacking visual references. I read the stuff on Sitepoint about tables which is excellent, then I read about 30 more pages besides

    Next mission is to write a test style sheet for an imaginary table of data, and it's good practice for editing my vBulletin forum templates as well.

  18. #68
    SitePoint Enthusiast protheory's Avatar
    Join Date
    Mar 2008
    Location
    Notts, England
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post

    Pro, here's one really great reason why table tags won't go away: The things in tables naturally have a relationship with each other. In other HTML tags, you can only show that (and not readily); for instance, we know that in a definition list, there are groups of two things which have some sort of relationship with each other.

    However, in a table, you can use either "scope" or "headers" (or maybe in the future, axis) to say, all these certain cells belong with this header. So in a calendar made of a table, with scope=col on each of your days, then each date now has a day associated with it. A screen reader can read that out. Thursday, 16 May. HTML doesn't have anything that can get that specific.
    If axis ever gets anywhere, it would be a great addition to the whole "semantic web" thing where people can pick out certain information out of a table like you pick stuff out of a database table.

    Besides, if they were going to get rid of tables, then IE couldn't have any at all : )
    Thanks again : ) now I'm a bit more clued up on the scope attributes and stuff. I'm going to go through HTML Utopia's table section tomorrow as well, can't help to get more practice for future sites containing tabular data such as products, calendars as you say, and events etc. I might even start a 'Help me validate my vBulletin forum' topic, got 52 errors on a Transitional DTD at the moment, just on the front page and it's almost all tables edited by me in my less informed days. I seem to remember countless inline styles added to my tags in there, it would be great to sort out a sheet for it all, and it makes upgrading the forum software easier as well : )


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
  •