1

I have added additional static links in magento top link beside checkout login etc. Default welcome, my account etc links are left aligned, and i want my additional links to be right aligned.

I am wondering how can i just control additional links i mean set of additional links to align right? For controlling with css we need some container element for only additionl links, but adding it with xml only create more li tags and append it in same ul.

here is my code

<default>
<reference name="top.links">
<action method="addLink" translate="label title">
<label>Custom Link 1</label>
<url>http://www.example.com/</url>
<title>Custom Link 1</title>
<prepare/>
<urlParams/> 
<position>101</position>
       <liParams >
       <class>custom_link</class>
       </liParams>
<aParams><![CDATA[target="_blank"]]></aParams>
</action>
</reference>

I am wondering how can sorround these links with a div or any container element to which i can apply my css. i Can add class to individual item, but how to add class to the bunch 5 additional links only without touching the postioning of default links can someone help?

Below is the Snapshot how i want to achieve. Snapshot of how i would like to achieve

  • "how to add class to the bunch 5 additional links only without touching the postioning of default links" > could you please give an example of the expected/problematic sorting of your top links or a screenshot? – Anna Völkl Aug 10 '14 at 12:32
  • updated question with snapshot. thank u :-) @AnnaVölkl – echoashu Aug 11 '14 at 10:02
2

What about just put a position:relative on the outer diff and position them absolute?

If not, you have a problem, because magento doesnt differ between your additional links.

The alternative is to just add your links directly into page/template/links.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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