<link rel="stylesheet" type="text/css" href="magento/skin/frontend/default/default/css/styles.css" media="all" />

how can i get this path in magento ?

i have tried this code but it didn't work.

<link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/styles.css');?>">
  • where are you trying to get this in phtml file? and make sure your current theme is default Jan 5, 2017 at 11:25
  • i have been trying to get this file here app/design/frontend/base/defaulttemplate/catalogsearch/form.mini.phtml
    – Afzal Khan
    Jan 5, 2017 at 11:30
  • what is output of this code because i can't find any problem in code. Jan 5, 2017 at 11:35
  • it isn't working
    – Afzal Khan
    Jan 5, 2017 at 11:37
  • can you share the output of this code and make sure you editing the correct file Jan 5, 2017 at 11:41

2 Answers 2


Replace Code With:

<link rel="stylesheet" href="<?php echo $this->getSkinUrl(); ?>css/yourCssfile.css" type="text/css" />
  • not working....
    – Afzal Khan
    Jan 5, 2017 at 11:40

Use this code

<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('custom.css') ?>" />
  • not working for me (Magento @h-parekh working for me May 22, 2018 at 3:35

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.