0

I have visual force pages where i have put custom CSS and everything was working fine till yesterday. For eg I have CSS file style.css which i have included at the top my my salesforce page and it has the below code

body{
    height:auto;
    width:1038px;
    margin:0 auto
}

At initial page load my page is taking the CSS from my style.css file.

Today morning i checked that whenever i re-render some portion of the page, my custom CSS is lost and it gets replaced by salesforce CSS coming from common.css file.

Till yesterday everything was perfectly working. I have not done any changes into my code. Dont know why this is happeneing. Any knowledge ?

Update: This issue only happens when my style is in separate static resource. If i paste the CSS into the page directly, then it works fine. But i cannot put the styles into the page.

7
  • 1
    Have you tried to use !important notation? Like width:1038px !important; Commented Mar 9, 2015 at 9:21
  • No, I have not used important. I cannot make it important. It happens for most of the elements and I have a very huge style file. The above example was just for illustration. Another case which happens is my button text gets very small
    – Yameen
    Commented Mar 9, 2015 at 9:26
  • We notice many errors in a standard SFDC main.js since this morning on all our euro orgs (problems with apex:tab, datepicker,...). Seems to be a SFDC bug... Commented Mar 9, 2015 at 9:29
  • I am using US org - (cs and na instances)
    – Yameen
    Commented Mar 9, 2015 at 9:31
  • @mast0r can u please check if this is happening with syles also ? As mentioned above everything was working fine till yesterday. Even if i rerender anything, my styles were left untouched and my pages were looking perfect
    – Yameen
    Commented Mar 9, 2015 at 9:35

2 Answers 2

0

Seems like this was salesforce bug which they have fixed. My pages are working fine on cs11 . :)

1
  • I think static resource is not imported successfully, when you put file in static resource. Could you please check it. Commented Mar 13, 2016 at 5:14
0

Use !important to override their css. For eg.

body{
    height:auto !important;
    width:1038px !important;
    margin:0 auto !important
}

It will override other css and give high priority to your css

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .