Results 1 to 10 of 10

Thread: HTML table coding

  1. #1
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default HTML table coding

    Hi, I am using one of my existing website code to create a new website. The existing website utilize rowspan to place the body of the website content at the top of the code for search engine opitmization, but have 2 column as the first row. My new website only needs one column, so I use the colspan to merge two cells. Once I did that, the 2nd row got screwed up. Please see the link below. I need to get rid of the big space between the left navigation bar and the body of the content. Can anybody shed some lights on how to do that?

    http://72.52.89.208/FitnessGrace/index.htm

    Thanks!

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Don't use tables for layout. You might look at this template (you can adjust the widths of the columns however you desire).

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Tables are now strongly discouraged for layouts. They do work, but often they also have problems and they make the page render more slowly than using DIVs.

    In this case you are also taking an existing (working) table layout and starting by making it very awkward code with colpspan attributes, etc. It will be difficult to control it precisely across all browsers.

    That said, you can continue, but you will probably get more help if you replace at least some of that with divs, which are now standard.

    [posted at the same time as traq]
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the response. The reason I used table is to use rowspan so that I can move the content of the website up to the top of the html code for search engine optimization. Is there any other way to accomplish that?

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can position a div in a complicated way so that a certain part of the page is offset.

    For example, place your content div at the beginning of the page, then make an absolutely positioned div that jumps to the top of the page for the navigation menu. This will cause the menu to appear first and the content second, but to a search engine it will be the opposite.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi Daniel,

    Thanks for the response. I am not familiar with the coding you suggested. Do you have an example I can use?

    Thanks!

  7. #7
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there gracexl,

    check out the attachment, for a reworking of your page,


    coothead

  8. #8
    Join Date
    Feb 2009
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks. I have two questions for the code you wrote:
    1. will it cause the search engine to read the content of the website first before going through the navigation bar? My goal is to create an organic searchable website so my website can be placed at the top of google page. Any tips and insight would be very much appreciated.
    2. I did try your code, and the layout looks the same as my current code which has a big gap between my navigation bar and content of my website. see the link below

    http://screencast.com/t/tL2NTW9cuC

  9. #9
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    If you lay out your page in an organized way, and label things, then search engines won't have any problem determining where your content is and ranking it accordingly. Search engines aren't stupid. If your page has a good, logical outline, then you shouldn't have any problems, even though the content doesn't come until partway down the page.

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I agree with traq about that.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Tags for this Thread

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
  •