WordPress.org

Forums

Twenty Twelve: Word-Break Issues (14 posts)

  1. Laidir
    Member
    Posted 3 years ago #

    Please could someone advise me how I would stop words breaking at the end of each line in the Twenty Twelve template.

    I'd rather there was no breaking of words and that if a word doesn't fit on the sentence, it is automatically placed on the next line down as the word-break seems to make things more difficult for the reader to read and breaks the natural flow of reading.

    I have tried removing the word-break coding at the top of my custom template, but this makes no difference.

    Thanks in advance

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    to start with: don't copy all styles from Twenty Twelve into style.css of the child theme; that is what this line does: @import url("../twentytwelve/style.css");

    only add styles to overwrite what you want to change.

    to stop the breaking of the words, add:

    .site-content article {
    	word-wrap: normal;
    }

    http://www.w3schools.com/cssref/css3_pr_word-wrap.asp

  3. Laidir
    Member
    Posted 3 years ago #

    Thanks for that. Wasn't sure what I should do in terms of the contents of the css file in my child theme.

    I've tried the above fix. It doesn't stop the words from breaking?

  4. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    ps:
    for the sidebar, there is another style - add also:

    .widget-area .widget
    {
      word-wrap: normal;
    }

    and do not forget to clear the browser cache if you want to see changes to the styles immediately - press 'reload' (sometimes needs more than one reload) or press 'ctrl f5' ...

    if this does not work:

    please post a link and point to a particular word.

    what browser are you using?

  5. Laidir
    Member
    Posted 3 years ago #

    Hi,

    Thanks for your help.

    I've cleared the cache. All other changes I make are registering too when I adjust the child theme but the word-break code is still breaking words at the end.

  6. Laidir
    Member
    Posted 3 years ago #

    I'm using Firefox.

    See the word breaks in the first post here:

    http://www.valeriejefferies.com/fitness/category/personal-blog/

    The word intensity on the second line.

  7. leejosepho
    Member
    Posted 3 years ago #

    IE8 on a wide screen does not show any hyphenations until paragraph seven, but they are there.

  8. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    you are right - I didn't check the original css;

    expand the styles to:

    .site-content article {
    	word-wrap: normal;
    -webkit-hyphens: none;
    	-moz-hyphens: none;
    	hyphens: none;
    }
    
    .widget-area .widget
    {
      word-wrap: normal;
    -webkit-hyphens: none;
    	-moz-hyphens: none;
    	hyphens: none;
    }
  9. pander
    Member
    Posted 2 years ago #

    Could WordPress please offer a general option to enable/disable hyphenation?

  10. Andrew
    Forum moderator
    Posted 2 years ago #

    Pander, you can ask this in the Requests and Feedback forum.

  11. Maruti Mohanty
    Member
    Posted 2 years ago #

    Thanks @alchymyth. It works :)

  12. karlcw
    Member
    Posted 2 years ago #

    Thanks Michael, your help is much appreciated.

  13. Fra Calo
    Member
    Posted 2 years ago #

    Thanks Alch.,
    You've got style!!

  14. Smarty
    Member
    Posted 2 years ago #

    Thanks Alch.

    It seems that this works for pages, but my posts are still showing word-breaks. Do you know what to do?

Topic Closed

This topic has been closed to new replies.

About this Topic