Image Replacement for Responsive Designs


https://forum.kartris.com/Topic2310.aspx
Print Topic | Close Window

By ianguest - Mon 19 Aug 2013
I am looking into replacing the login and shopping basket links to images for small mobile type screens. This would allow the links to be represented by a small logo for each and provide a simple cleaner layout.

Is this possible? And does anyone have any suggestions on code?
By Paul - Mon 19 Aug 2013
If you check the code in the UserControls/Front/BasketView.aspx, you can find the mini basket section. Near the top of this, there is some code which shows the basket link. Typically for most sites, it shows a dropdown type full basket summary for full size screens, but just a link for small screens.

This is the code:

            <div class="compactminibasket show-for-touch" style="display: none;">
<asp:Literal ID="litCompactShoppingBasket2" runat="server" EnableViewState="false" />
</div>

<div id="minibasket" class="infoblock hide-for-touch">
<div id="minibasket_header">


From here, you can see the text of the link is formed for a literal control called litCompactShoppingBasket2. You need to find this in the codebehind, and you should see the string of text that is built up and added to
litCompactShoppingBasket2.Text.

Just need to change this code to call an image, remove the text, etc.