August 24, 201016 yr Afternoon, I'm currently in the middle of a project and need to create a table for the pricing tariff of the hotel site. What is the best method to create a tariff table (trying to sway away from the word table as they are dead but best word to describe the visual) should i create a wrapped div, with seperate divs inside and make it as a list? or is there a better method? Cheers, croz27
August 24, 201016 yr You could definitely use a list, perhaps a definition list using dl, dt and dd where the dt and dd can be separately analysed by other programs if necessary. Use two or more floated side by side, be careful that the lines line up across. There's no reason to avoid tables if the data fits neatly into a tabular structure, that's what tables were designed for. I would avoid lots of separate divs in columns.
August 24, 201016 yr Author thanks for the reply! not for this site but this is an example of what kind of tariff i need to do but with it tidyed a hell of alot! http://alpaka.com/frw_tariffs.htm i think divs may be to crowded for this kind of table so maybe a simple html is the way forward.. many thanks.
August 24, 201016 yr I would say that was a good use of a simple html table. There are some divs inside table cells which I would try to avoid. I think the site you linked could have avoided them.
August 24, 201016 yr Author alrighty, thanks Wickham v helpful... just always want to develop using the best practice.
August 24, 201016 yr I hate this whole tables are outdated thing. They aren't outdated, they just shouldn't be used for an entire site layout, they should be used for building tables...that is why they are called tables. The idea when building a site is to use the correct element for what you are trying to do, <p> for paragraphs, <ul> for an unordered list, <ol> for an ordered list, <strong> to add emphasis to text and <table> for tables. Sorry that rant has nothing to do with you, just the misunderstanding that divs are a replacement for tables in general when they aren't. Looking at what you have there it should be built using a table because it is a table, you can style them quite nicely with that new fangled css thing too EDIT: teehee my little rant meant that Wickham replied before me...so I second what he said
August 24, 201016 yr Author ha! rant indeed but definitely took on board what your saying. i agree and i wouldn't ever use tables to create a site but that tables are for tables... just coding it up now - cheers for the advice. Been travelling and just getting back into the development side of things and just want to do it properly. thanks for the help.
August 24, 201016 yr I really hope you don't think that I was having a go at you, as I wasn't, there is just so many misleading sites out there that make it seem like using tables at all is a sin. But really the best thing to do is if you call it a table it is most likely a table Welcome to the forum by the way, I hope you enjoy it here and find the place a useful resource while you are getting back into development
August 24, 201016 yr I really hope you don't think that I was having a go at you, as I wasn't, there is just so many misleading sites out there that make it seem like using tables at all is a sin. But really the best thing to do is if you call it a table it is most likely a table Welcome to the forum by the way, I hope you enjoy it here and find the place a useful resource while you are getting back into development I'm with Dizi, This is an appropriate time to use a table, because you are representing tabular data. For some inspiration, See here: http://patterntap.co...lection/41/1/90
August 24, 201016 yr http://patterntap.co...lection/41/1/90 ooou nice link there are some amazing table examples on there
August 25, 201016 yr There's no reason to avoid tables if the data fits neatly into a tabular structure, that's what tables were designed for. Golden words. +1 For some inspiration, See here: http://patterntap.co...lection/41/1/90 Very useful link, mate. +1 to karma.
Create an account or sign in to comment