Word Break and PHP

Posted on 2007-10-11
Last Modified: 2008-02-05
If you look at the two news articles at the top here. The one on the right has problems as there is no word break. This leaves a big gap. Is there a way to break the word with php?
Question by:roscoeh23
    LVL 48

    Accepted Solution

    Are you lookingf for something like ? Don't see a missing word-wrap in that link (with FF)
    LVL 4

    Expert Comment

    You can also do this in CSS by applying the attribute - word-wrap: break-word - you can add it to the body tag for it to apply across the whole document. I believe that the element (or it's parent) needs to have a width set for the word-wrap attribute to work.

    Remember - Style should be controlled by style sheets. ;)


    Author Comment

    None of these methodes work as the problem is the hyperlink.

    Any ideas?

    LVL 48

    Expert Comment

    No but breaking links over several line is in my opinion no good idea. You can try to add spaces after the. or just use the domain without the www in front of. Or use other text like homepage of XX which will break correctly.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now