[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 03-10-2008, 07:17 AM   #1 (permalink)
NamePros Member
 
Join Date: Feb 2008
Posts: 26
0.00 NP$ (Donate)

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, 07:25 AM   #2 (permalink)
Senior Member
 
netzilla's Avatar
 
Join Date: Aug 2005
Location: Ohio
Posts: 1,704
223.80 NP$ (Donate)

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, 07:30 AM   #3 (permalink)
NamePros Member
 
Join Date: Feb 2008
Posts: 26
0.00 NP$ (Donate)

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 />
</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, 08:49 AM   #4 (permalink)
NamePros Regular
 
monaco's Avatar
 
Join Date: Jul 2005
Location: Tucson, AZ
Posts: 695
314.80 NP$ (Donate)

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, 01:28 PM   #5 (permalink)
NamePros Regular
 
Teddy's Avatar
 
Join Date: Sep 2003
Location: New Jersey / Boston
Posts: 670
69.50 NP$ (Donate)

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:35 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85