473,840 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

table gutter spacing in CSS

I have a table with 3 columns in 1 row. I want to increase the spacing
_between_ the columns (gutter) _without_ increasing the spacing between
those columns and the table itself. Is there a way to do that in CSS
without having to code in extra dummy columns in HTML to create gutters?

| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
Apr 28 '06
10 11068
ph************* *@ipal.net wrote:
On Sun, 30 Apr 2006 11:08:12 +0100 Steve Pugh <st***@pugh.net > wrote:
| ph************* *@ipal.net wrote:
|>td { padding-left: 24px; }
|>td:first-child { padding-left: 0px; }
| You'll need to add a class to the first cell to cope with IE's
| non-support of the :first-child pseudoclass.

I'm not going to worry about IE. I'll include a "Get Firefox" Icon/link.
Or just let IE users have a slightly different presentation (not as
good in your eyes but as no one else is likely to see it in more than
one browser, probably no one else will notice or care). Get Browser X
buttons are generally a waste of space and effort.
|>But I still need to find a way to sequeeze the extra space off the edges
|>of the table. HTML seems to force 2 pixels there unless I do cellspacing=0
|>in the HTML on the table element.
| That would be the browser's default cellpadding/border-spacing (the
| two are largely analogous). Setting it to zero in CSS in IE is done by
| setting border-collapse: collapse (yes even if you have no borders).
| Setting it to non zero values in CSS in IE is trickier.

And Firefox? Or are you just doing IE?

FireFox, Opera, Safari, etc., etc. support border-spacing and hence
don't need extra mollycoddling.

In your case border-collapse: collapse will suffice for all browsers
as that automatically sets border-spacing to zero.

"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Apr 30 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: bjam | last post by:
Hi, I am trying to do the following, which is to have a single place to define my table paramaters such as cellpadding / cellspacing etc. Below is the code I am trying to achieve see the cell spacing element in the table html tag below. Thanks in advance for any help you can provide. I really appreciate it. This is currently not working as I can't have an xsl:value-of select inside of the table tag itself... does anyone have any ideas...
by: Justin French | last post by:
Hi all, I've been using CSS for typography for quite some time, but have not looked into it too deep at all in regards to layout. Now is as good a time as any eh? Whilst ultimately I'll want to look at complex layouts (and can find plenty of tutorials on them already), I just want to start with the basics for the moment...
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also tried setting it on all of the cells of that row. This hasn't worked, so I was wondering if anyone knew how it could be done. Thanks, Rick DeBay
by: CMAR | last post by:
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. Is there a way to minimize that vertical spacing? Thanks, CMA <div class="vlgray">Condition</div> <table cellpadding="0" cellspacing="0">
by: Selden McCabe | last post by:
Sometimes I want to put a table inside a cell of another table (say, to create 3 equal divisions, etc.). When I want the inner table's edges to correspond exactly with the edges of the cell, I set the border (top, left, bottom, right) to zero for both the inner table and outer table. Also padding to 0 and spacing to 0. But, for some reason, there is still some space between the bottom of the inner table and the bottom of the containing...
by: Barbara de Zoete | last post by:
Here's what I'm trying to do: Create a table with generic style property . Have a few table cells in the thead that 'have to' melt into eachother, so needing the style . Looking somthing like: ,------------.------------. | | header |
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into a div table and after I save it I noticed that the slideshow does not show up and the embed code I added is altered. Can anyone help me figure this out? The embed code that I'm talking about is three quarters down the code page under {PHOTOS},...
by: Jan | last post by:
Hi: I was so sure this was easy that I left it for the last minute and now I'm stuck. I'm working on the student directory for my kids' school and since it will be printed on 3-hole punch paper, we need the margins to switch: big left margin on the even-numbered pages, big right margin on the odd-numbered pages. But I can't for the life of me figure out how to set this up, programmatically or otherwise. I searched the archives, etc....
by: Stepheno | last post by:
Hi, I am a recently converted Iseries (AS/400) RPG programmer trying to learn HTML/CSS/JavsScript all at the same time (not fun). My problem deals mostly with CSS. I will be reveiving a table, for which number of rows/columns i will not know, and I have to pretty up the table, including a verical scroll bar. This has to work in IE6, IE7, and FireFox 3.5. The CSS I currently have will give me a scrollable table, but only if I hard code...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.