Advertisement

06.01.2008 at 06:58PM PDT, ID: 23448740
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

Locked Headers in HTML table block first row of data when referenced via HREF

Asked by bmclellan in Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)

Tags: , ,

Hello,

I am using some code I found to lock my header row on my table via CSS, however the only problem I have is that when the I reference a link back to my table, the line of data is actually hidden under the header of the table.

I somehow need to say, keep the header locked, but make sure the data lines always stay under the header, do not scroll behind them.

Hope someone can help!
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
<HTML>
	<head>
		<title>Test Page</title>
		<style type="text/css">
	div.tbl-container {
	   height: 90%; 	/* must be greater than tbody*/
	   overflow: auto;
	   margin: 0 auto;
	   width: AUTO;
	   scrollbar-base-color: #ffeaff;
	}
	table {
	   width: 99%;		/*100% of container produces horiz. scroll in Mozilla*/
	   border: none;
	   background-color: whitesmoke;
	   scrollbar-base-color: #ffeaff;
	   height: 100%
	}
	table>tbody	{  /* child selector syntax which IE6 and older do not support*/
	   overflow: auto;
	   height: 250px;
	   overflow-x: hidden;
	}
	thead tr	{
	   position:relative; 
	   top: expression(offsetParent.scrollTop); /*IE5+ only*/
	}
	thead td, thead th {
	   text-align: center;
	   font-size: 14px;
	   font-weight: bold;
	   border-top: solid 1px silver;
	   position: relative;
	   color: white;
	   background-color: navy;
	   text-align: left;
	}
	td	{
	   padding-right: 2px;
	   font-size: 12px;
	   text-align: left;
	   border-bottom: solid 1px silver;
	   border-left: solid 1px silver;
	}
	td:last-child {padding-right: 20px;} /*prevent Mozilla scrollbar from hiding cell content*/
	</style>
	</head>
	<body>
		<B><H4>Test List</H4></B>
		<DIV class=tbl-container>
			<TABLE cellspacing="0">
				<THEAD>
					<TR>
						<th><B>Name</B></th>
						<th><B>Description</B></th>
					</TR>
				</THEAD>
				<TBODY>
					<TR><TD><A NAME="Name_1">1</A></TD><TD>Description 1</TD></TR>
					<TR><TD><A NAME="Name_2">2</A></TD><TD>Description 2</TD></TR>
					<TR><TD><A NAME="Name_3">3</A></TD><TD>Description 3</TD></TR>
					<TR><TD><A NAME="Name_4">4</A></TD><TD>Description 4</TD></TR>
					<TR><TD><A NAME="Name_5">5</A></TD><TD>Description 5</TD></TR>
					<TR><TD><A NAME="Name_6">6</A></TD><TD>Description 6</TD></TR>
					<TR><TD><A NAME="Name_7">7</A></TD><TD>Description 7</TD></TR>
					<TR><TD><A NAME="Name_8">8</A></TD><TD>Description 8</TD></TR>
					<TR><TD><A NAME="Name_9">9</A></TD><TD>Description 9</TD></TR>
					<TR><TD><A NAME="Name_10">10</A></TD><TD>Description 10</TD></TR>
					<TR><TD><A NAME="Name_11">11</A></TD><TD>Description 11</TD></TR>
					<TR><TD><A NAME="Name_12">12</A></TD><TD>Description 12</TD></TR>
					<TR><TD><A NAME="Name_13">13</A></TD><TD>Description 13</TD></TR>
					<TR><TD><A NAME="Name_14">14</A></TD><TD>Description 14</TD></TR>
					<TR><TD><A NAME="Name_15">15</A></TD><TD>Description 15</TD></TR>
					<TR><TD><A NAME="Name_16">16</A></TD><TD>Description 16</TD></TR>
					<TR><TD><A NAME="Name_17">17</A></TD><TD>Description 17</TD></TR>
					<TR><TD><A NAME="Name_18">18</A></TD><TD>Description 18</TD></TR>
					<TR><TD><A NAME="Name_19">19</A></TD><TD>Description 19</TD></TR>
					<TR><TD><A NAME="Name_20">20</A></TD><TD>Description 20</TD></TR>
					<TR><TD><A NAME="Name_21">21</A></TD><TD>Description 21</TD></TR>
					<TR><TD><A NAME="Name_22">22</A></TD><TD>Description 22</TD></TR>
					<TR><TD><A NAME="Name_23">23</A></TD><TD>Description 23</TD></TR>
					<TR><TD><A NAME="Name_24">24</A></TD><TD>Description 24</TD></TR>
					<TR><TD><A NAME="Name_25">25</A></TD><TD>Description 25</TD></TR>
					<TR><TD><A NAME="Name_26">26</A></TD><TD>Description 26</TD></TR>
					<TR><TD><A NAME="Name_27">27</A></TD><TD>Description 27</TD></TR>
					<TR><TD><A NAME="Name_28">28</A></TD><TD>Description 28</TD></TR>
					<TR><TD><A NAME="Name_29">29</A></TD><TD>Description 29</TD></TR>
					<TR><TD><A NAME="Name_30">30</A></TD><TD>Description 30</TD></TR>
					<TR><TD><A NAME="Name_31">31</A></TD><TD>Description 31</TD></TR>
					<TR><TD><A NAME="Name_32">32</A></TD><TD>Description 32</TD></TR>
					<TR><TD><A NAME="Name_33">33</A></TD><TD>Description 33</TD></TR>
					<TR><TD><A NAME="Name_34">34</A></TD><TD>Description 34</TD></TR>
					<TR><TD><A NAME="Name_35">35</A></TD><TD>Description 35</TD></TR>
					<TR><TD><A NAME="Name_36">36</A></TD><TD>Description 36</TD></TR>
					<TR><TD><A NAME="Name_37">37</A></TD><TD>Description 37</TD></TR>
					<TR><TD><A NAME="Name_38">38</A></TD><TD>Description 38</TD></TR>
					<TR><TD><A NAME="Name_39">39</A></TD><TD>Description 39</TD></TR>
				</TBODY>
			</TABLE>
		</DIV>
		
		<HR>
		<B><H4>Link To Part</H4></B>
		
		<A HREF="#Name_1">1</A>
		<A HREF="#Name_2">2</A>
		<A HREF="#Name_3">3</A>
		<HR>
	</body>
</HTML>
[+][-]06.01.2008 at 07:22PM PDT, ID: 21689187

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 07:31PM PDT, ID: 21689217

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 08:12PM PDT, ID: 21689349

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)
Tags: CSS, Web Browser, CSS, HTML
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.01.2008 at 09:16PM PDT, ID: 21689542

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 05:42AM PDT, ID: 21691424

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 06:01AM PDT, ID: 21699871

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628