thead and tbody synchronizing

thead.fixedHeader_refq tr {
	position: relative;
}

html>body thead.fixedHeader_refq tr {
	display: block;
	width: 100%;
}

html>body tbody.scrollContent_refq {
	display: block;

	overflow-y: scroll;
	width: 100%;
	height: 255px;
	cursor: pointer;
}



 html>body thead.fixedHeader_refq th {
	width: 65px;
 	border: 1px ridge #fff;
 	background: #979999;
	color: #fff;
	font-size:12px;
}

html>body thead.fixedHeader_refq th + th {
	width: 175px;
} 

html>body thead.fixedHeader_refq th + th + th {
	width: 96px;
} 

html>body thead.fixedHeader_refq th + th + th + th {
	width: 138px;
}
html>body thead.fixedHeader_refq th + th + th + th + th {
	width: 64px;
}

html>body thead.fixedHeader_refq th + th + th + th + th + th{
	width: 78px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th{
	width: 158px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th{
	width: 68px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th{
	width: 128px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th{
	width: 20px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th{
	width: 29px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th{
	width: 29px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 19px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 40px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 125px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 19px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 19px;
}
/*     SPECIAL CASE FOR NON REFERRAL MANAGERS     */
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th.nonRefMgr {
	width: 88px;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td.nonRefMgr{
	width: 75px;
}
/*     */
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 14px;
}
html>body thead.fixedHeader_refq th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th + th{
	width: 86px;
}
html>body tbody.scrollContent_refq td {
	width: 65px;
	text-align: center;
	word-break: break-all;
	font-size:12px;
}

html>body tbody.scrollContent_refq td + td {
	width: 175px;
	text-align: center;
	word-break: break-all;
} 

html>body tbody.scrollContent_refq td + td + td {
	width: 96px;
	text-align: center;
	word-break: break-all;
} 

html>body tbody.scrollContent_refq td + td + td + td {
	width: 138px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td {
	width: 64px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td{
	width: 78px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td{
	width: 158px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td{
	width: 68px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td{
	width: 128px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td{
	width: 20px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td{
	width: 29px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td{
	width: 29px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 19px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 40px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 125px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 19px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 19px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 20px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.scrollContent_refq td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td + td{
	width: 66px;
	text-align: center;
	word-break: break-all;
}
html>body tbody.over_rr{
	height: 300px;
}
 th[class|="type"]{
        cursor:pointer;
      }
 html > body thead.fixedHeader_refq th.sortingCol{
 	color:#0E3C57;
 }

Open in new window


I am just trying to keep the thead and tbody columns in synch. the tbody columns shift with the width of their contents. I want the head and body elements to change width similarly.
onaled777Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mikkel SandbergFront End DeveloperCommented:
Hi onaled777,
It's hard to say what exactly the best course of action is without knowing the application of these styles. My initial thought would be to use different markup to display your content (block level elements like divs or sections come to mind). Tables by nature do not behave well when you are trying to get content to adjust to different sizes.
If you are willing to post some of the HTML markup here, I may have a better idea of how to advise you.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.