Solved

Colgroup in Chrome

Posted on 2012-03-17
3
633 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
  • 2
3 Comments
 
LVL 16

Expert Comment

by:s8web
Comment Utility
Your CSS selectors should be:

#JKL table.warning
0
 
LVL 16

Accepted Solution

by:
s8web earned 500 total points
Comment Utility
#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
Comment Utility
Perfect.  Thank you.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now