Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 51
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Why should I abandon my table layout

    This isn't meant to spark a debate over tables versus div tags. I am only concerned about what is best for my site.

    Like fashion aficionados, whenever a fellow webmasters reviews my personal site layout, they arbitrarily suggest my dumping last season's table layout for newer div tags, without a second thought as to how good the old look looked on me. The consensual arguement for using div tags over tables for a layout: "it not the table tags intended purpose." Well, I shutter to think how many modern conveniences we would forfeit if they were used strictly for their "intended purpose."

    There are ninenteen translucent table cells in the layout of my page. If I were to compose it with div tags, I would have to write nineteen unique id names, nineteen positioning and object perimeters, and nineteen opacity settings, all of which would be in an external stylesheet that has loading priority over my actual page. So why should I use divs when I have a perfectly good table?

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    Well, CSS loads fast, its DHTML compliant.

    TABLEs are necessary to display ( rows of ) data, especially, when pulled from db.

    http://www.mediasworks.com/tutorial/


    http://anshul.guideseeq.com/personal/

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    I agree that CSS is the better way to go ... but ...

    Since it's your own site, I would do whatever you want. It would be a
    different situation if you were coding for other people.

    If you provide websites for other people, it might be best to show your
    "personal site" as an example, thus, you would convert it to CSS.

    The look is a personal preference ... I think it looks too dark myself.

    But if you like it the way it is, tell your developer friends they can create a CSS version of your site if it bothers them that much.

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by nadamt
    This isn't meant to spark a debate over tables versus div tags.
    There is your first problem. It isn't tables versus div tags, it is tables versus semantic coding. Like lets say you have a header image on your page, you could use a div tag and use CSS to set the background to your image, or a more meaningful way would be actually use an image tag and style that. You should read up on some articles talking about XHTML semantics. An additional plus side to you, the programmer, is that it makes your code easier to understand by looking at the code. You might think this is silly because you wrote it and won't forget how you did it... just wait until you go back to something you wrote like 2 years before, you won't remember everything you thought you would, so making the code easier to understand for humans, in addition to the browser, is a good plus.

    A couple common mistakes and/or misconceptions people usually have when "getting off tables" for you layout is that they go div crazy when they could use a simpler, more semantic layout. An easy way to test this is to go view your site, disable CSS and see if it still presents itself in a manner where you could understand like, oh, this is a title, this is body text, etc. Additionally they totally miss the first word in CSS, cascading, meaning you can cascade attributes down without having re-define them for each sub element.

    There are ninenteen translucent table cells in the layout of my page. If I were to compose it with div tags, I would have to write nineteen unique id names, nineteen positioning and object perimeters, and nineteen opacity settings, all of which would be in an external stylesheet that has loading priority over my actual page. So why should I use divs when I have a perfectly good table?
    I don't see why you would, especially given what I already said. Plus think about this, any CSS attributes you make and are in an external file, the viewer downloads that file once, and then from then on, while viewing subsequent pages, their browser just uses the cached version saving the time (and resources) of downloading it again.
    OracleGuy

  • #5
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oracleguy
    I don't see why you would, especially given what I already said. Plus think about this, any CSS attributes you make and are in an external file, the viewer downloads that file once, and then from then on, while viewing subsequent pages, their browser just uses the cached version saving the time (and resources) of downloading it again.
    That's a good point, but it doesn't pertain to my site. All of my site's content will be viewed in the iframe, therefore, the top and bottom rows of my table act as a navigtional frame to the iframe's mainframe--my tables, like an external CSS file, are loaded only once (albeit after the aforementioned file). I'm perfectly willing to replace the tables if someone can explain why it would benefit my site. (i.e. would the fact that the external CSS file loads first be offset by the large amount CSS coding required to keep my layout? If so, by how much?)

    And were you implying that I would go "div crazy" or be otherwise ignorant? I know how to use "semantic coding"--all of the content in the iframe is, and will continue to use it--moreover, I think I'm reasonalbly economical with my codes, and I've read many articles on the topic. I don't deny that it has it's advantages (i.e. "intended purpose"), but it should be used on a case by case basis. In my case, it would be tedious and cumbersome go the route of semantic coding for my layout.
    Last edited by nadamt; 07-28-2005 at 10:22 PM.

  • #6
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nadamt
    There are ninenteen translucent table cells in the layout of my page. If I were to compose it with div tags, I would have to write nineteen unique id names, nineteen positioning and object perimeters, and nineteen opacity settings
    Well, there you go - nineteen translucent table cells for a layout like that?
    You could make it with four divs, and the rest in semantic markup and CSS.

    Think that speaks for itself...

    Kind regards,

    Gary

  • #7
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Graft-Creative
    Well, there you go - nineteen translucent table cells for a layout like that?
    You could make it with four divs, and the rest in semantic markup and CSS.

    Think that speaks for itself...

    Kind regards,

    Gary
    Counterproductive sarcasim aside, could you please elaborate?

  • #8
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nadamt
    Counterproductive sarcasim aside, could you please elaborate?
    Certainly: You would have a container div to wrap your site into a fixed size unit. You could center this div horizontally, and probably vertically with CSS (a search on this forum for 'css vertical positioning' or some such should throw back some ideas)

    A div for the top nav - with an unordered list for the navigation items (same for the footer)

    A div for the main content with overflow: auto set in the CSS file....and Robert's yer Mums brother

    less code, quicker downloads, less maintenence, future proof blah blah blah - you know the score.

    gary

  • #9
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Graft-Creative
    A div for the top nav - with an unordered list for the navigation items (same for the footer)
    Wouldn't that require every cell being a link?

  • #10
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nadamt
    Wouldn't that require every cell being a link?
    Well, no - you wouldn't actually have any cells: the main blocks of your site would be contained and positioned in div tags, anything else could be marked up sematically, with the visual appearance dictated via your CSS file.

    I'm not really sure where you're coming from, you say you don't want to spark a debate? Well I'm afraid most of the people on this forum have been in the debate for a good few years now - and the result has been decided, and not for nothing. The answers are already out there, as you know, it's your decision which way to go - so why come on here with the 'I'm not trying to start a debate, but I am' attitude?

    This forum is for helpful people to help other helpful people, it's not an arena for gauntlet tossing.

    Gary

  • #11
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Graft-Creative
    Well, no - you wouldn't actually have any cells: the main blocks of your site would be contained and positioned in div tags, anything else could be marked up sematically, with the visual appearance dictated via your CSS file.
    Let me rephraze the question: wouldn't converting the navigational row of my table into a CSS horizontal menu require every li tag to contain a link?

  • #12
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Why should you? To be accessible.

  • #13
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Quote Originally Posted by nadamt
    Let me rephraze the question: wouldn't converting the navigational row of my table into a CSS horizontal menu require every li tag to contain a link?
    What else would it contain?

  • #14
    New Coder
    Join Date
    Jul 2005
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by rmedek
    What else would it contain?
    My point is that I use empty empty table cells in my site layout, so simply making the top and bottom rows into horizontal menus would involve more than two unordered lists.

    In other related news, when I manually increase or decrease the size of the text in Firefox, all of the opacity in my site turns solid until I reload the page. Could someone would be kind enough to confirm that this has to do with my using a table layout, or if this is a Firefox bug (or both...or neither)? Thanks.

  • #15
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by nadamt
    And were you implying that I would go "div crazy" or be otherwise ignorant? I know how to use "semantic coding"--all of the content in the iframe is, and will continue to use it--moreover, I think I'm reasonalbly economical with my codes, and I've read many articles on the topic. I don't deny that it has it's advantages (i.e. "intended purpose"), but it should be used on a case by case basis. In my case, it would be tedious and cumbersome go the route of semantic coding for my layout.
    I wasn't implying anything, I was talking in general. I fail to see how it would be "tedious and cumbersome" based on the layout, the only way it would be is if you just didn't care about it enough to do it. How you write the code should always be the same, it is what you write that would depend on each layout.

    One additional advantage of CSS is that you can re-design your entire site by simply using a different stylesheet (i.e. CSS Zen Garden), assumming you had that fore sight in mind when you originally wrote the (X)HTML. Even if you didn't, you can still make site wide changes very easily by simply changing the stylesheet, I have done it before and it is nice. Sure you could use SSI for some of that functionality but nonetheless...
    Last edited by oracleguy; 07-30-2005 at 05:36 AM.
    OracleGuy


  •  
    Page 1 of 4 123 ... LastLast

    Posting Permissions

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