tags:

views:

81

answers:

2

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".

+2  A: 

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

.ux-row-action-cell, .x-grid3-cell-inner
danyim
.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.
danixd
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>`
DavidYell
i have added a comma between that but no luck. showing the same error
Mohin
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: http://www.w3.org/TR/CSS2/selector.html
danyim
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
Michael Mrozek
+2  A: 

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.

Ian Wetherbee
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.
Mohin
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?
Ian Wetherbee
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;}.......................................................
Mohin
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
Mohin