NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [resolved] Remove default spacing before table?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 03-10-2008, 08:17 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Feb 2008
Posts: 33
raydar is an unknown quantity at this point
 



Question Remove default spacing before table?


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.
raydar is offline  
Old 03-10-2008, 08:25 AM   #2 (permalink)
Senior Member
 
netzilla's Avatar
Join Date: Aug 2005
Posts: 1,717
netzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to behold
 



Can you post the code ?
netzilla is offline  
Old 03-10-2008, 08:30 AM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Feb 2008
Posts: 33
raydar is an unknown quantity at this point
 



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 />
????: NamePros.com http://www.namepros.com/programming/442692-resolved-remove-default-spacing-before-table.html
</tr>
</table>

I'm finding the gap between the DATA h4, and the beginning of the table.

Thanks.
raydar is offline  
Old 03-10-2008, 09:49 AM   #4 (permalink)
NamePros Regular
 
monaco's Avatar
Join Date: Jul 2005
Location: Tucson, AZ
Posts: 689
monaco will become famous soon enough
 



You could try setting the top margin to be negative and see what that does.
__________________
My Website | My Blog
monaco is offline  
Old 03-10-2008, 02:28 PM   #5 (permalink)
NamePros Regular
 
Teddy's Avatar
Join Date: Sep 2003
Location: New Jersey / Boston
Posts: 649
Teddy has a spectacular aura aboutTeddy has a spectacular aura about
 



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;
}
Let me know if that does not work.
__________________
Previously known as Schoolsux
I've finally returned.
Current project: Your Free Forum
Teddy is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:02 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger