0

What is the error in this CSS class?

.ux-row-action-cell .x-grid3-cell-inner {
    padding:1px 0 0 0;
}

I don't see any error in ASP.NET, but when I am using the same CSS in PHP, Firebug says "syntax error".

1
  • 1
    Strictly speaking, you can't use CSS in PHP. Can you provide more information about how/where you're including this CSS? Commented Jul 16, 2010 at 14:11

2 Answers 2

2

Perhaps your selector is what's causing the issue... Try adding a comma in between:

.ux-row-action-cell, .x-grid3-cell-inner
Sign up to request clarification or add additional context in comments.

5 Comments

.ux-row-action-cell .x-grid3-cell-inner{} this refers to the .x-grid3-cell-inner class which is a child of the .ux-row-action-cell class. is different to .ux-row-action-cell, .x-grid3-cell-inner{} This refers to both .ux-row-action-cell and .x-grid3-cell-inner, and will apply the styling to both.
It's dependant if your HTML is <div class="ux-row-action-cell x-grid3-cell-inner"> or <div class="ux-row-action-cell"><div class="x-grid3-cell-inner"><!-- etc --></div></div>
i have added a comma between that but no luck. showing the same error
Try adding parent elements to those classes? Like div.ux-row-action-cell, span.x-grid3-cell-inner etc. It may also just be that Firebug isn't up-to-date on selector syntax. Here's a relevant link to a standards document on CSS selectors: w3.org/TR/CSS2/selector.html
That comma isn't syntactic sugar, it completely changed what the selector means. .foo .bar means an element with the bar class inside an element with the foo class, e.g. <div class="foo"><div class="bar">this is affected</div></div>. .foo, .bar means an element with either the foo or bar class, so it matches <div class="bar"></div> even if there's no .foo parent
2

It would be helpful if we could get a bigger snippet of the code around that line. Static strings would be output the same either way, so possibly a malformed piece of your dynamic code is causing the syntax error. The syntax for that one line is correct.

4 Comments

Actually, I am using a css file RowActions.css which has this class: .ux-row-action-cell .x-grid3-cell-inner { padding:1px 0 0 0; } There other classes also but firebug says syntax error in line 2 which is the above line i have given: .ux-row-action-cell .x-grid3-cell-inner { In my Index.html page, i have added this files reference. In my Index.html page, i am using a grid and the css is being used for that grid.
So it probably isn't caused by a dynamic error since you're just referencing it, but it still sounds like the error is really in another line. Can you post the first 10 lines of the css file?
Hi sure. Here is the first few lines of my css file. But remember, I am using this same file in my asp.net web site and it is working fine. .................................................... /* styles for rows / .ux-row-action-cell .x-grid3-cell-inner { padding:1px 0 0 0; } .ux-row-action-item { float:left; min-width:16px; height:16px; background-repeat:no-repeat; margin: 0 3px 0 2px; / margin: 1px 5px 0 2px; */ cursor:pointer; overflow:hidden; } .ext-ie .ux-row-action-item { width:16px; } .......................................................
HI, i finally found the answer. Actually the file was missing one of its portion when i uploaded the file using filezilla. Now i fixed the issue and uploaded the full file. Thanks for all of ur time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.