Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 30th, 2008, 01:09 PM
Newbie
 
Join Date: Aug 2008
Posts: 4
Default Need to put horizontal scroll bar for 4 cells alone in table using HTML

Hi All,

I need to put a horizontal scroll bar for 4 cells alone where my first cell in table should not contain any horizontal scroll bar .

In clear, let us say there are 5 columns in my table i want to put horizontal scroll bar only for 2nd,3rd,4th and 5th column alone where my 1st column should not horizontal scroll bar . so that I can scroll only last 4 columns .

Please some one provide me sample code as early as possible in doing this using HTML .

thanks,
Amuven
Reply
  #2  
Old August 30th, 2008, 05:14 PM
David Laakso's Avatar
Expert
 
Join Date: Aug 2008
Location: US
Posts: 302
Default

Quote:
Originally Posted by amuven
Please some one provide me sample code as early as possible in doing this using HTML .
Hmm-- sample code?, as early as possible?
Well, anyway...
Create two adjacent columns with a table in each, and set the right column to overflow-x: scroll; ?
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta name="generator" content=
  6. "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
  7. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  8. <title>table</title>
  9.  
  10. <style type="text/css">
  11. html, body {
  12. margin : 0;
  13. padding : 0;
  14. }
  15. body {
  16. font : 100% serif;
  17. text-align : center;
  18. }
  19.  
  20. #one
  21.     {border:1px solid red;overflow:hidden;
  22.     float: left;
  23.     width: 100px;
  24.     }
  25. #two
  26.     {border:1px solid red;overflow:hidden;
  27.     float: left;
  28.     width: 660px;overflow-x: scroll;
  29.     }
  30. .c1 {width: 3000px;}
  31. #wrapper
  32.     {border:1px solid red;
  33.     float: left;
  34.     float/**/: none;
  35.     }
  36. /* easy clearing */
  37. #wrapper:after
  38.     {
  39.     content: '.'; 
  40.     display: block; 
  41.     height: 0; 
  42.     clear: both; 
  43.     visibility: hidden;
  44.     }
  45. #wrapper
  46.     {
  47.     display: inline-block;
  48.     }
  49. /*\*/
  50. #wrapper
  51.     {
  52.     display: block;
  53.     }
  54. /* end easy clearing */
  55.  
  56.  
  57. </style>
  58. </head>
  59. <body>
  60. <div id="wrapper">
  61. <div id="one">
  62. <table>
  63. <tr>
  64. <td>one</td>
  65. </tr>
  66. </table>
  67. </div>
  68. <div id="two">
  69. <table class="c1">
  70. <tr>
  71. <td>two</td>
  72. <td>three</td>
  73. <td>four</td>
  74. <td>five</td>
  75. </tr>
  76. </table>
  77. </div>
  78. </div>
  79. </body>
  80. </html>
  81.  
  82.  
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles