473,748 Members | 6,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to put horizontal scroll bar for 4 cells alone in table using HTML

4 New Member
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
Aug 30 '08 #1
1 9105
David Laakso
397 Recognized Expert Contributor
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.  
Aug 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2886
by: Nishant | last post by:
I have a combo box with a horizontal scroll bar. (Used SetHorizontalExtent) The dropdown with horizontal scroll bar works fine when I have more items in the dropdown list. However when the number of items is less, the horizontal scroll bar comes over the last item. If there is only one item, I am not able to see that item because of Horizontal scroll.
2
1242
by: Richard Brooks | last post by:
Basically, what I want to do is to have a viewport where an image is dropped in (hidden) on the right hand side and for the right hand side to be scrolled into view, when a key to go right is pressed. I guess that two table cells with no gap between them (to look like a single wide graphic) will allow me to drop a new image in and then scroll. So, scrolling right would mean to drop the new view in on the right (hidden) then to scroll...
4
3936
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create the element outside of the table and then using cut & paste in HTML View to move it to the desired location, or by manually typing the code in using HTML View. The first technique sometimes does not automatically update the list of elements...
3
2526
by: Vidds | last post by:
Hi Everyone, How come Server listbox control does not have a Horizontal Scroll Property? If any one has an idea how we add a Horizontal scroll to a listbox or dropdown list box it would be quite helpful.Thanks in advance Regards Vidds
1
1036
by: abc | last post by:
I don't know How to use HTML's DIV Tag to do that web page which have header (Top), content (datagrid) with scroll bar, and bottom footer. How should I do?
5
10179
by: RobertK | last post by:
I have a table that displays one row of images (thumbnails). When a user clicks on an image it opens up a bigger image below it. The row has about 20 cells. I have a <divtag which allows the user to scroll left and right to see all the images. The problem is that when the user scrolls to the middle and clicks on the image. The click causes a post back and the page loads again and the scroll bar goes to the left. I need to know how to...
4
2495
tpgames
by: tpgames | last post by:
I need a code that forces all people's firefox browsers to give them a horizontal scroll bar regardless of what their tool bars and other factors tell the browser to do. I have a crossword puzzle game that does not show up on my friends browser correctly, but shows up correctly in mine and on my sisters. My sister and he has the same screen size. He says he was using FF like me. I put the game up on IE and it showed up correctly. It only doesn't...
7
4119
by: yuki007 | last post by:
I need to know how to add many datas into a table using html form and the php query for example, i want to do like this <form action="addsong.php" method="post"> song1: <input type="text" name="song" /> song2: <input type="text" name="song" /> song3: <input type="text" name="song" /> song4: <input type="text" name="song" /> <input type="submit" value="submit" /> </form>
0
1712
by: skoyala | last post by:
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 but i need to put vertical scroll bar to both first and 4 cells.both first and 4 cells should scroll vertically but 4 cells only scroll horizontally 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...
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.