Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Colgroup in Chrome

Posted on 2012-03-17
3
Medium Priority
?
678 Views
Last Modified: 2012-08-13
I am trying to line up a table, and it displays as expected in Firefox but not in Chrome.  All three columns are bumped up against each other.

HTML:
<div id='JKL'>
	<table class="warning">
		<tr>
			<colgroup>
			<col class="col1" />
			<col class="col2" />
			<col class="col3" />
			</colgroup>
			<td><img src="../images/arrowdown.gif"></td>
			<td>Don't stop here!<br><span class="secondline">Now</span></td>
			<td><img src="../images/arrowdown.gif"></td>
		</tr>
	</table>
</div>

Open in new window


CSS:
#JKL .warning table
{
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 20px;
    margin-top: 20px;
	margin-left:auto;
	margin-right:auto;
	height: 30px;
}
#JKL .warning td
{
    font-size: 16px;
	font-weight:bold;
	padding-top: 10px;
	margin-left:auto;
	margin-right:auto;
	text-align: center;
	vertical-align: center;
}
#JKL .warning .col1 .col3
{
    width: 60px;
}
#JKL .warning .col2
{
    width: 90%;
}

#JKL .warning td .secondline
{
    font-size: 12px;
	padding: 5px;
	margin-left: 2px;
	vertical-align:top;
	height: 30px;
}

Open in new window

0
Comment
Question by:kkbenj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Expert Comment

by:s8web
ID: 37732503
Your CSS selectors should be:

#JKL table.warning
0
 
LVL 16

Accepted Solution

by:
s8web earned 2000 total points
ID: 37732510
#JKL  table.warning
{
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 20px;
    margin-top: 20px;
	margin-left:auto;
	margin-right:auto;
	height: 30px;
}
#JKL table.warning td
{
    font-size: 16px;
	font-weight:bold;
	padding-top: 10px;
	margin-left:auto;
	margin-right:auto;
	text-align: center;
	vertical-align: center;
}
#JKL table.warning .col1, #JKL table.warning .col3
{
    width: 60px;
}
#JKL table.warning .col2
{
    width: 90%;
}

#JKL table.warning td span.secondline
{
    font-size: 12px;
	padding: 5px;
	margin-left: 2px;
	vertical-align:top;
	height: 30px;
}

Open in new window

0
 

Author Closing Comment

by:kkbenj
ID: 37732605
Perfect.  Thank you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question