www.webdeveloper.com
Results 1 to 5 of 5

Thread: How to add background image just TD?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,628

    Question How to add background image just TD?

    I enclose background image.
    I like to add background just to listboxes.
    How to do this?


    Code is like:
    PHP Code:

    <tr><td class="">Myfirstlistbox1
    <
    select name="colour">
    <
    option value='0'>Choose car...</option>
    <
    option value=''>Mercedes</option>
    </
    select>
    </
    td></tr>



    <
    tr><td  class="">Size
    <
    select name="measure">
    <
    option value='0'>Choose colour&#8230;</option>
    <option value=''>5m</option>
    </
    select>
    </
    td></tr
    This background is in the middle of table with many TR and TD.

    Is this possible to manage and have BOTH TR within ONE background?
    Attached Images Attached Images
    Last edited by toplisek; 04-07-2010 at 05:14 AM.

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    Imo it would involve much less markup code and be easier to add a bg image to just the the elements you want if you didn't use tables for layout purposes.

  3. #3
    Join Date
    Sep 2005
    Posts
    1,628
    Tell me more info
    Last edited by toplisek; 04-07-2010 at 06:23 AM.

  4. #4
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Tableless Web Design: http://en.wikipedia.org/wiki/Tableless_web_design
    How to convert manually your HTML tables to CSS: http://www.table2css.com/articles/co...-tables-to-css
    Images, Tables, and Mysterious Gaps: https://developer.mozilla.org/en/Ima...ysterious_Gaps

  5. #5
    Join Date
    Mar 2010
    Posts
    2,803
    Quote Originally Posted by toplisek View Post
    Tell me more info
    Instead of using tables to arrange your web page's content you could use just the appropriate markup elements for your content and use css positioning or float to position elements on the page to create your layout. Tableless layouts generally have cleaner and leaner code.

    For a given page layout, tables will generally involve more code than tableless layouts - especially if you start using nested tables.

    Code using tables, and again with nested tables, is generally much more cluttered and generally harder to maintain as you are finding out indirectly as a result of your original post.

    It's a personal choice whether to use tables or not. I prefer to not use tables for layout.

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