How to wrap text in a element in IE


Tags:
html,css,internet-explorer

Problem :

As <a> elements often contain long URLs with various tokens, this often breaks out of the outer container the link is in.

To prevent this, there are the CSS properties word-wrap, word-break and -ms-word-break(for earlier versions of IE). However, I couldn't get those working in IE (tried with IE11).

Here is the Fiddle Demo.

How can I make content of a <a> element automatically wrap inside of it's outer container in IE11?



Solution :

The link should have following styles to wrap properly:

a {
    word-wrap:wrap-word;
    word-break:break-all;
    display:inline-block; /* block would also work */
}

    CSS Howto..

    How to prevent exceeding the parent's boundary?

    How to centre a javascript element using inline css? [closed]

    How to decode base64-encoded font information?

    How do i make li active in angularJS?

    How to Change Error Message Css Style (Parsley)

    How to keep div same height at all times

    CSS how to get floated left text to wrap?

    How do I move that div with CSS in a clean way?

    how to make an ul lay out horizontally?

    How to resize parent div while keeping dynamic child divs 100% height

    How to make a background header image extend to full width of browser

    How to create this border styles in HTML/CSS? [closed]

    how to get particular words with dotted lines in HTML and CSS?

    How to Change blue background selection color from image using css

    How to achieve “paper-like” background effect? [closed]

    How do I display all the data in a MySQL table in a theme? [closed]

    How to close the menu after click third layer menu item

    How to create dynamic business listings in wordpress [closed]

    How to develop a webpage with Bootstrap [closed]

    How to disable Javascript/CSS minification in ASP.NET MVC 4 Beta

    How to make image override parent width and stretch to browser width?

    jquery div hidden and show, z-index issue and mouseover/mouseout issue

    How do I organize imports in Compass/Blueprint?

    How do I add a custom CSS image to the target background behind a given layer of text in Squarespace?

    how to apply stylesheet to wp frontend, via plugin i created?

    How can I align two icons on my webpage next to each other?

    CSS--how to detect screen aspect ratio and apply styling accordingly? [duplicate]

    how to align divs with different width within another parent div?

    How to avoid text go below the thumbnail with css

    How can you have your websites resolution change according to the users screen resolution?