Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

H1 Causes Table Row to Expand 1

Status
Not open for further replies.

MrTBC

Technical User
Nov 19, 2003
610
US
I'm using H1 tags in a table row and it's causing the row to expand downwards in IE6 (I've not checked in any other browsers), e.g.


Any ideas please?
(I'm not an HTML expert)

Thanks very much.
 
Different browsers render the stylings of HTML elements differently. I always remove all padding and margin from elements in my css by using the * selector:

[tt]* {
padding: 0;
margin: 0;
}[/tt]

and then specifically set the margin and padding for any elements I want.

Your H1 is pushing the table open because of either padding or margin default settings in IE 6.

----
star.gif
 
Posted at 11.39. Solved at 11.42. That's what makes Tek Tips the best.

Thank you so much.
 
You need to add some CSS to remove the H1's padding and/or margins:
Code:
h1 {
	color: #3B5998;
	font-size: 14px;
	text-align: center;
	display: compact;
	[red]margin:0;
	padding:0;[/red]
}
You might want to review two recent threads - thread215-1468842 and thread215-1468257 for better ways to produce rounded corners.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks everyone.

I'm really just trying to get the layout on screen at the moment - but will look at better ways of achieving these effects (e.g. rounded corners) once I can see a layout that looks OK.

Some of the cells with text in are expanding to the right. Is there a straightforward fix for this as well please?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top