| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Does anyone know how to remove the default white space that comes before a table? I'd like to align the top of the table almost flush with the header before it. I've reset the header margins and padding, and did the same for the table, but still get about 15px of white space between the bottom of the header and the top of the table. Thanks. |
| |
| | #3 (permalink) |
| NamePros Member | Code Here's the css: h4 { font-family:Arial, Helvetica, sans-serif; font-size: 12px; color: #666666; font-weight: bold; margin: 0; padding: 0; } table { margin: 0; padding: 0; border: none; border-collapse: collapse; } Here's the HTML: <h4>DATA</h4> <table width="410"> <tr> <td width="187">Name</td> <td width="112">Location</td> <td width="95">Date</td> </tr> <tr> <td colspan="2"><h4>Entries</h4></td><br /> </tr> </table> I'm finding the gap between the DATA h4, and the beginning of the table. Thanks. |
| |
| | #5 (permalink) |
| NamePros Regular | The header tag is what is doing it. You have to set the margin for the bottom of the h4 tag to be -15 px, so the code should be: Code: h4 {
font-family:Arial, Helvetica, sans-serif;
font-size: 12px;
color: #666666;
font-weight: bold;
margin: 0 0 -15px 0;
padding: 0;
}
__________________ Previously known as Schoolsux I've finally returned. Current project: Your Free Forum |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |