This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes CSS working in IE and ff but not in Chrome Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "CSS working in IE and ff but not in Chrome" Watch "CSS working in IE and ff but not in Chrome" New topic
Author

CSS working in IE and ff but not in Chrome

Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
Hi,

I am having css class:

.errorMsgAlignment{
width:25% !important;
}

it's working fine in IE and Firefox but not in Chrome.
Please help me to fix it.

Thanks in Advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56201
    
  13

Please post an SSCCE (Short Self-Contained Correct Example) that shows the problem.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
On my JSP page:

<td ${isIncorrectPassword=='true' ? 'class="errorMsgAlignment" ' : ''}>

and in css file:



.errorMsgAlignment{
width:25% !important;
}

I marked width here as important because width is overding by width defined for td class.
Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
I got my solution

Actually there are two columns so I am changing the width of first column(td) 25% which is acceptable by every bwoser but not by Chrome so I changed the width of second td to 75% to make complete tr width 100%.

And now it's acceptable by chrome too.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: CSS working in IE and ff but not in Chrome
 
Similar Threads
Request is not sending as POST
String appending problem in IE8
JSF xhtml pages not working with Safari Browser
Browser specific
Form and commandButton