0

How can I override a CSS class selector only my footer on the login page?

login page is the default login page which is copied and loaded from

/theme/package/template/persistent/customer/form/login.phtml

The page identifier seems to be:

customer-account-login

But my CSS has no effect. How can I do this?

'local.xml' contains this code:

<?xml version="1.0"?> 
  <layout version="0.1.0">
     <!-- Login Page -->
     <customer-account-login>
        <reference name="head">
          <action method="addItem">
            <type>skin_css</type>
            <file>css/login.css</file>
          </action>
        </reference>
     </customer-account-login>
  </layout>

'login.css' file is this (which what I want to apply to the footer container):

.footer-container { height:185px; padding:0px 0px 10px 0px; position:absolute; bottom:0; width:98%; }
1
  • Do you want to change footer style only for login page?? Commented Oct 12, 2017 at 7:46

2 Answers 2

1

change your local.xml layout handle to customer_account_login, It should be

<?xml version="1.0"?> 
  <layout version="0.1.0">
     <!-- Login Page -->
     <customer_account_login>
        <reference name="head">
          <action method="addItem">
            <type>skin_css</type>
            <file>css/login.css</file>
          </action>
        </reference>
     </customer_account_login>
  </layout>
2
  • 1
    Perfect, it worked, thanks! Not sure who was quicker with the answer :)
    – Dan
    Commented Oct 12, 2017 at 22:26
  • @Dan No worries its just a few second difference Commented Oct 13, 2017 at 7:55
1

You are using the wrong handler

instead

<customer-account-login>

Use

<customer_account_login>

it should be _ not -

6
  • 1
    Ahhh, few seconds faster :)
    – Keyur Shah
    Commented Oct 12, 2017 at 8:22
  • @KeyurShah Yes, Just a few seconds difference Commented Oct 12, 2017 at 8:32
  • @MurtuzaZabuawala: bro how are you
    – Ramesh S
    Commented Oct 13, 2017 at 6:39
  • @RameshS sorry for late reply , I am good how are you ? Commented Oct 13, 2017 at 10:01
  • Answer from Keyur showed on top so assumed it was first. Happy to change?
    – Dan
    Commented Oct 14, 2017 at 9:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.