www.webdeveloper.com
Results 1 to 9 of 9

Thread: Tables within tables etc

  1. #1
    Join Date
    Dec 2005
    Posts
    49

    Red face Tables within tables etc

    I want to have a cell in a table to have a background (text on top)...is this possible? Or do I need to have a table within a table?

    I want to be able to:

    1 - have a background to a section within a table.
    2 - Have the background stretch to fit (100%)
    3 - The text I will have ontop of this section with the background may over flow and so I want to have an auto scroll on it.

    I am not very keen on using frames etc

    Hope that all makes sense!

    Thanks to anyone who can help/guide/advise me

  2. #2
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    Do not nest tables! Try learning CSS if you just want to posistion things.

  3. #3
    Join Date
    Feb 2003
    Location
    San Diego
    Posts
    141
    Hey Robert

    I still haven't gotten into CSS yet, so I'm still using nested tables and other old coding methods. Why is doing that such a bad thing? Also, do any WYSIWYG applications provide CSS tools that are easy to use? (It took me forever to just figure out HTML)

  4. #4
    Join Date
    Dec 2005
    Posts
    49
    Ok - but i still dont know where to begin...can anyone help please?

    Why is nested tables bad and how would i do this using nested tables?

  5. #5
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    Tables aren't needed:
    Code:
    <html>
    <head>
    <style type="text/css">
    <!--
    body {
    	margin: 0;
    	padding: 0;
    }
    #somestyle {
    	overflow: auto; /* overflow: scroll; May also be used, it' will have the apperance of frames */
    	height: 100%;
    	width: 100%;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="somestyle">
    Content Goes Here...
    </div>
    </body>
    </html>

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Quote Originally Posted by gd4
    Why is nested tables bad?
    HTML isn't about presentation, it's about describing how the different parts of a page fit together logically. The TABLE element is for describing how data falls into intersecting categories in the same way that the P element is for indicating a paragraph. Put another way:
    Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.
    From the HTML 4.01 Specification
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  7. #7
    Join Date
    Dec 2005
    Posts
    49
    Thanks for taking the time to reply and explain things

    Its all going over my head a bit though :-/ I think I maybe could do with going back to basics! Can anyone point me in the direction of CSS tutorials etc? or some decent tutorial stuff on the net/book??

    Thanks

  8. #8
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    http://www.w3.org/MarkUp/#tutorials

    DO NOT GO PAST THE FIRST TWO LIST ITEMS, the three by Dave Raggett. You have been warned.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  9. #9
    Join Date
    Dec 2005
    Posts
    49
    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles