Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Specify where a line should break

Back to Forum: Tech Off
  • User profile image
    steinster

    Hei!

    Im developing a webside for mobile devices and Im currently having fun with the small screen size!

    I have the string

    <a href="/M/Cart" class="top_bar_link_item"><img src="http://lctools.lundbeckconsulting.no/Gfx/Icon/shopping-cart-yellow-icon.png" style="width:22px;position:relative;top:7px;" /><span style="font-size:small;margin-left:4px;color:yellow;" class="top_bar_link_item"><asp:Literal ID="LiteralCart" runat="server" /></span></a>


    When the device screen is too small I want the sentence to break at "<img".

    When the screen is to small I want this:

    <a href="/M/Cart" class="top_bar_link_item">
    <br /> (just for demostration)
    <img src="http://lctools.lundbeckconsulting.no/Gfx/Icon/shopping-cart-yellow-icon.png" style="width:22px;position:relative;top:7px;" /><span style="font-size:small;margin-left:4px;color:yellow;" class="top_bar_link_item"><asp:Literal ID="LiteralCart" runat="server" /></span></a>



    Did this make any sense? Thanks in advanced :)


    -Stein

  • User profile image
    steinster

    I figured it out!

     

    Ended up with:

    <span class="top_bar_item" style="font-size:medium;"><asp:Literal ID="LiteralHeader" runat="server" /></span>
                                    <span><a href="/M/Cart" class="top_bar_link_item" style="text-wrap:none;"><img src="http://lctools.lundbeckconsulting.no/Gfx/Icon/shopping-cart-yellow-icon.png" style="width:22px;position:relative;top:7px;" /><span style="font-size:small;margin-left:4px;color:yellow;" class="top_bar_link_item"><asp:Literal ID="LiteralCart" runat="server" /></span></a></span>

     

    So the clue was to enclose them both in span's :)

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.