cellpadding, cellspacing, margins, borders, none of them are working for me |
cellpadding, cellspacing, margins, borders, none of them are working for me |
Momruoy |
Apr 27 2007, 10:47 AM
Post
#1
|
Group: Members Posts: 4 Joined: 27-April 07 Member No.: 2,644 |
I'm in the process of designing http://www.yandwproductions.com/ and I just can't get the sidebar to line up for the life of me. I've set all the margins, padding, spacing, borders, EVERYTHING to 0 and yet there's still a several pixel gap between the image links that I want gone.
What more can I do to put them in the right spot? |
Shadeaux |
Apr 27 2007, 11:01 AM
Post
#2
|
Member Group: Members Posts: 31 Joined: 24-April 07 Member No.: 2,621 |
Is there any particular reason you want it in a table?
Without seeing the stylesheet, it's hard to tell what might be causing it. Also, and I may be incorrect on this, but I believe you need "" marks around the name of the class. Dave |
Darin McGrew |
Apr 27 2007, 11:37 AM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Also, and I may be incorrect on this, but I believe you need "" marks around the name of the class. For HTML, quotes around attribute values are often optional. See the FAQ entry Should I put quotes around attribute values? |
Darin McGrew |
Apr 27 2007, 11:53 AM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
A quick check found that the widths of your table rows don't match up. If you're going to specify widths for everything, then they need to match up. But I recommend that you simplify the markup. For example, you could eliminate the nested tables, and use ROWSPAN and COLSPAN instead. And I also recommend that you not use a fixed-width design.
When debugging the structure of tables (layout tables or data tables), it helps to turn on borders everywhere. You can turn them off again once you've got the structure right. While you're at it, the online tools report a number of HTML errors and CSS errors that you should fix. |
Momruoy |
Apr 29 2007, 09:29 PM
Post
#5
|
Group: Members Posts: 4 Joined: 27-April 07 Member No.: 2,644 |
I recommend that you simplify the markup. For example, you could eliminate the nested tables, and use ROWSPAN and COLSPAN instead. I've never used ROWSPAN or COLSPAN, how would I implement them? Is there a quick and dirty tutorial somewhere I can check on? Should I just eliminate the tables altogether and just use DIVs and SPANs? Would they achieve the same effect? |
pandy |
Apr 30 2007, 06:08 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
No, if you you want to ditch tables you should use maningful elements like P, proper headings and so on. DIVs only to create sections and SPAN almost never. Actually, you should do that even if you keep the tables.
Meanwhile, there's a short explanation of rowspan and colspan here: http://htmlhelp.com/reference/html40/tables/td.html . Maybe this can illustrate. HTML <table border="2"> <tr> <td>aaa aaa aaa</td> <td>bbb bbb bbb</td> </tr><tr> <td colspan="2">ccc ccc ccc</td> </tr> </table> There are two cells in the first row, creating two columns, but only one cell in the second row. The cell in the second row has to span two columns. |
Momruoy |
Apr 30 2007, 08:23 AM
Post
#7
|
Group: Members Posts: 4 Joined: 27-April 07 Member No.: 2,644 |
|
Momruoy |
Apr 30 2007, 05:46 PM
Post
#8
|
Group: Members Posts: 4 Joined: 27-April 07 Member No.: 2,644 |
Phew, figured it out!
Instead of having nested tables, it now uses nested DIVs. Much better control. Thanks for the help, guys! |
Lo-Fi Version | Time is now: 17th April 2024 - 11:42 PM |