6 Replies Latest reply on Aug 31, 2010 5:48 AM by MurraySummers

    Tables, Divs or both

    MichaelCo

      I think i asked this question a long time ago but I am now getting around to finalizing my web site and I am not sure if a table in a div is a good idea.

      I have a div for wrapper, header, navigation,mainbody and footer. All are in my template and the only editable region is the mainbody.

      I could place a right div, left div and possibly a center div and have several divs in those 3 larger divs.

      Or I could use tables as for some of my pages, I will be using photographs (of fitted kitchens).

      I am thinking about having about 9 small thumbnail pictures on left side of page and each would change bigger picture on right of page.
      I am thinking that when I do the maths, a table may be better even although it is in amongst divs.

      Am I causing myself future grief or is this the correct way round it.

      Thank you for taking the time to read my short story and I hope you can help me.

      regards

      Michael

        • 1. Re: Tables, Divs or both
          J Cellini Level 3

          CSS is for page layout and a table is for tabular data. When it comes to laying out thumbnails, I would use CSS although some web designers would use a table, which is no great sin in this case. But it's not difficult to layout images with CSS and your markup will be a lot cleaner.

          I could place a right div, left div and possibly a center div and have several divs in those 3 larger divs.

           

          Do you need all those divs? It seems to me that you just need one <div> for the thumbnails and another for the larger photo.

          1 person found this helpful
          • 2. Re: Tables, Divs or both
            MichaelCo Level 1

            Thank you for your reply,

             

            JCellini wrote:

             

            CSS is for page layout and a table is for tabular data. When it comes to laying out thumbnails, I would use CSS although some web designers would use a table, which is no great sin in this case. But it's not difficult to layout images with CSS and your markup will be a lot cleaner.

            I could place a right div, left div and possibly a center div and have several divs in those 3 larger divs.

             

            Do you need all those divs? It seems to me that you just need one <div> for the thumbnails and another for the larger photo.

            I could, as you suggested, put thumbnails in one div and the larger picture in another. Is it possible to have those divs change the bigger picture when I mouse over the thumbnails.

            I want the larger picture to change on mouseover to a larger version of the thumbnail.

            I know it can be done in tables but not sure if it can be done with thumbnails within a div.

             

            regards

             

            Michael

            • 3. Re: Tables, Divs or both
              MurraySummers Level 8

              I know it can be done in tables but not sure if it can be done with thumbnails within a div.

               

              The container of an element has no bearing on what events can be applied to that element.  So, you can definitely do this whether the thumbs are within a span, a paragraph, a table, or a div.

              1 person found this helpful
              • 4. Re: Tables, Divs or both
                MichaelCo Level 1

                Murray *ACP* wrote:

                 

                I know it can be done in tables but not sure if it can be done with thumbnails within a div.

                 

                The container of an element has no bearing on what events can be applied to that element.  So, you can definitely do this whether the thumbs are within a span, a paragraph, a table, or a div.

                Hi Murray, me again.

                 

                Do I have to use Fireworks or similar programme in order to create a layout for this. Or is there a better way using dreamweaver.

                 

                Michael

                • 5. Re: Tables, Divs or both
                  osgood_ Level 8

                  MichaelCo wrote:

                   

                  Murray *ACP* wrote:

                   

                  I know it can be done in tables but not sure if it can be done with thumbnails within a div.

                   

                  The container of an element has no bearing on what events can be applied to that element.  So, you can definitely do this whether the thumbs are within a span, a paragraph, a table, or a div.

                  Hi Murray, me again.

                   

                  Do I have to use Fireworks or similar programme in order to create a layout for this. Or is there a better way using dreamweaver.

                   

                  Michael

                   

                  Don't use Fireworks use something like jquery or php

                   

                  I don't know how experienced you are with coding and css but search google for 'jquery image gallery' or 'jquery image gallery tutorial'

                   

                  Heres one I pulled up as an example:

                   

                  http://www.twospy.com/galleriffic/#1

                   

                  See list of examples, like:

                   

                  http://www.twospy.com/galleriffic/example-2.html

                  • 6. Re: Tables, Divs or both
                    MurraySummers Level 8

                    Generally speaking you would DESIGN your layout in FW or PS, slice out the optimized graphic elements that would appear on the page, and then build the page in DW adding whatever interactivity you require on that particular page as you create the HTML.  That interactivity could involve jQuery, or any of the many commercial/non-commercial extensions already mentioned.

                     

                    It would not be considered appropriate for any production work, under any circumstances, to allow your graphics application to write your page's HTML.