10 replies [Last post]
mzimmers
mzimmers's picture
Offline
Enthusiast
CA, USA
Last seen: 9 years 48 weeks ago
CA, USA
Timezone: GMT-8
Joined: 2007-11-12
Posts: 124
Points: 67

Hi, all -

I'm in the process of migrating some code into a site that uses CSS. (Better late than never, right?) The page I'm having trouble with is quite simple; it can be viewed at:

http://www.scopedin.com/wordpress/?page_id=33

Before I started using CSS, my table data was indented a bit; now, as you can see, it's slammed up against the left border. In the very last couple lines of my CSS, I tried the following:
.custom .td
{
margin: 0px 0px 0px 10px;
}

(You can ignore the .custom tag.)

The syntax checker doesn't find anything wrong with this, but it's not doing anything either. Can someone give me an idea as to what I'm doing wrong here?

Thanks...I'll gladly provide more information if needed.

mz

Michael Zimmers
Staff Writer
www.scopedin.com

Triumph (not verified)
Anonymous's picture
Guru

mzimmers wrote:.custom

mzimmers wrote:
.custom .td
{
margin: 0px 0px 0px 10px;
}

Syntax error. .td means an element with class="td" attribute. If you want to affect the TD elements on the page don't use the period before the td.

mzimmers
mzimmers's picture
Offline
Enthusiast
CA, USA
Last seen: 9 years 48 weeks ago
CA, USA
Timezone: GMT-8
Joined: 2007-11-12
Posts: 124
Points: 67

OK...this is progress...

...in that the browser is at least trying to apply the td attributes to the table (as evinced by the "view style information" option in the Web Developer Toolbar).

But...it's still not indenting, so I must have done something else wrong. Any other ideas?

Thanks. I'm still learning the syntax of the CSS commands (obviously).

Michael Zimmers
Staff Writer
www.scopedin.com

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 19 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

margin = wrong padding =

margin = wrong
padding = right

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

mzimmers
mzimmers's picture
Offline
Enthusiast
CA, USA
Last seen: 9 years 48 weeks ago
CA, USA
Timezone: GMT-8
Joined: 2007-11-12
Posts: 124
Points: 67

thank you!

but...can you tell me why margin didn't work there?

Michael Zimmers
Staff Writer
www.scopedin.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

You wouldn't normally apply

You wouldn't normally apply margins to cells, you would use properties such as cellpadding, cellspacing or padding, border-spacing.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mzimmers
mzimmers's picture
Offline
Enthusiast
CA, USA
Last seen: 9 years 48 weeks ago
CA, USA
Timezone: GMT-8
Joined: 2007-11-12
Posts: 124
Points: 67

OK...thanks for the clarification...

...do I need to mark this resolved or anything like that?

Michael Zimmers
Staff Writer
www.scopedin.com

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 36 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Well, do you consider it

Well, do you consider it ended, or do you need any more help?

Verschwindende wrote:
  • CSS doesn't make pies

mzimmers
mzimmers's picture
Offline
Enthusiast
CA, USA
Last seen: 9 years 48 weeks ago
CA, USA
Timezone: GMT-8
Joined: 2007-11-12
Posts: 124
Points: 67

I think I'm done...

...with the original question, so I'm prepared to close this out, if someone could tell me how. Thanks.

Michael Zimmers
Staff Writer
www.scopedin.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Editing the topic title and

Editing the topic title and adding [resolved] or similar is sufficient.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 36 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

There we go, I did it for

There we go, I did it for you, nice and neat.

If you have any other problems, you know where to find us!

Verschwindende wrote:
  • CSS doesn't make pies