css how to break line when long data










1















I have search many of here but still not solve my problem, I have problem with my data is dynamic, some long and some short, short is never mind but for long text, I want it's beak line. but it's no break and draw the same line line(make duplicate text). please help me, this this my HTML



Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC)</a>


and my CSS:



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal



but my result like this enter image description here



What I want



Company name: REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND 
PACIFIC (RECOFTC)









share|improve this question

















  • 1





    use line-height:28px;

    – sansan
    Mar 7 '17 at 5:37











  • yes my problem solve by add line-height

    – koe
    Mar 7 '17 at 6:20















1















I have search many of here but still not solve my problem, I have problem with my data is dynamic, some long and some short, short is never mind but for long text, I want it's beak line. but it's no break and draw the same line line(make duplicate text). please help me, this this my HTML



Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC)</a>


and my CSS:



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal



but my result like this enter image description here



What I want



Company name: REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND 
PACIFIC (RECOFTC)









share|improve this question

















  • 1





    use line-height:28px;

    – sansan
    Mar 7 '17 at 5:37











  • yes my problem solve by add line-height

    – koe
    Mar 7 '17 at 6:20













1












1








1








I have search many of here but still not solve my problem, I have problem with my data is dynamic, some long and some short, short is never mind but for long text, I want it's beak line. but it's no break and draw the same line line(make duplicate text). please help me, this this my HTML



Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC)</a>


and my CSS:



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal



but my result like this enter image description here



What I want



Company name: REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND 
PACIFIC (RECOFTC)









share|improve this question














I have search many of here but still not solve my problem, I have problem with my data is dynamic, some long and some short, short is never mind but for long text, I want it's beak line. but it's no break and draw the same line line(make duplicate text). please help me, this this my HTML



Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC)</a>


and my CSS:



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal



but my result like this enter image description here



What I want



Company name: REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND 
PACIFIC (RECOFTC)






html css






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 '17 at 4:51









koekoe

434828




434828







  • 1





    use line-height:28px;

    – sansan
    Mar 7 '17 at 5:37











  • yes my problem solve by add line-height

    – koe
    Mar 7 '17 at 6:20












  • 1





    use line-height:28px;

    – sansan
    Mar 7 '17 at 5:37











  • yes my problem solve by add line-height

    – koe
    Mar 7 '17 at 6:20







1




1





use line-height:28px;

– sansan
Mar 7 '17 at 5:37





use line-height:28px;

– sansan
Mar 7 '17 at 5:37













yes my problem solve by add line-height

– koe
Mar 7 '17 at 6:20





yes my problem solve by add line-height

– koe
Mar 7 '17 at 6:20












6 Answers
6






active

oldest

votes


















1














Set line-height in your CSS.



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal;
line-height: 20px;






share|improve this answer























  • yes, thank my problem solve by used line-height

    – koe
    Mar 7 '17 at 6:21


















2














using line-height: 2; or line-height: 20px;



Example - 1: using line-height: 2;



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal;
line-height: 2;






#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal;
line-height: 2;

Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





Example- 2: using line-height: 20px;



#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal;
line-height: 20px;






#com_name
font-size: 12px;
position: fixed;
width: 50%;
word-break: break-all;
white-space: normal;
line-height: 20px;

Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>








share|improve this answer

























  • it's help me by used line-height

    – koe
    Mar 7 '17 at 6:21


















2














Use



#com_name
word-break: break-word;
white-space: normal






share|improve this answer






























    2














    Try this.



    .class_name 
    word-wrap: break-word;






    share|improve this answer
































      1














      I too faced this problem.You can use word-wrap,See my following example.



      Like this you will get






      #dob
      font-size: 11px;
      display: inline-block !important;*/
      vertical-align: middle !important;*/
      color: #365899;
      cursor: pointer;
      word-wrap: break-word;
      width: 158px;

      <div id="selectDob">
      <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
      <option value="0" selected="1">Day</option>
      </select>
      <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
      <option value="0" selected="1">Month</option>
      </select>
      <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
      <option value="0" selected="1">Year</option>
      </select>
      <div id="dobContent">
      <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
      </div>
      </div>








      share|improve this answer






























        1














         <html>
        <head>
        <style>
        /*anchor tag*/
        #com_name
        font-size: 12px;
        width: 50%;
        white-space: normal


        /*set width for first p tag*/
        .first
        width:8%;


        /*set width, margin-top and margin-left for second p tag*/
        .second
        margin-left:8%;
        margin-top:-33px;
        width:32%;

        </style>
        </head>
        <body>
        <p class="first">Company name:</p>
        <p class="second"> <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA
        AND PACIFIC (RECOFTC)</a></p>
        </body>
        </html>





        share|improve this answer

























        • A little explanation would be helpful

          – Rohit Agre
          Mar 7 '17 at 5:33










        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42640472%2fcss-how-to-break-line-when-long-data%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1














        Set line-height in your CSS.



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        share|improve this answer























        • yes, thank my problem solve by used line-height

          – koe
          Mar 7 '17 at 6:21















        1














        Set line-height in your CSS.



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        share|improve this answer























        • yes, thank my problem solve by used line-height

          – koe
          Mar 7 '17 at 6:21













        1












        1








        1







        Set line-height in your CSS.



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        share|improve this answer













        Set line-height in your CSS.



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 '17 at 4:55









        Venkatesh SGSVenkatesh SGS

        1,67421237




        1,67421237












        • yes, thank my problem solve by used line-height

          – koe
          Mar 7 '17 at 6:21

















        • yes, thank my problem solve by used line-height

          – koe
          Mar 7 '17 at 6:21
















        yes, thank my problem solve by used line-height

        – koe
        Mar 7 '17 at 6:21





        yes, thank my problem solve by used line-height

        – koe
        Mar 7 '17 at 6:21













        2














        using line-height: 2; or line-height: 20px;



        Example - 1: using line-height: 2;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        Example- 2: using line-height: 20px;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>








        share|improve this answer

























        • it's help me by used line-height

          – koe
          Mar 7 '17 at 6:21















        2














        using line-height: 2; or line-height: 20px;



        Example - 1: using line-height: 2;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        Example- 2: using line-height: 20px;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>








        share|improve this answer

























        • it's help me by used line-height

          – koe
          Mar 7 '17 at 6:21













        2












        2








        2







        using line-height: 2; or line-height: 20px;



        Example - 1: using line-height: 2;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        Example- 2: using line-height: 20px;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>








        share|improve this answer















        using line-height: 2; or line-height: 20px;



        Example - 1: using line-height: 2;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        Example- 2: using line-height: 20px;



        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;






        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>








        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 2;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>





        #com_name
        font-size: 12px;
        position: fixed;
        width: 50%;
        word-break: break-all;
        white-space: normal;
        line-height: 20px;

        Company name: <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA AND PACIFIC (RECOFTC) </a>






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 7 '17 at 5:01

























        answered Mar 7 '17 at 4:54









        Sumit patelSumit patel

        2,30631738




        2,30631738












        • it's help me by used line-height

          – koe
          Mar 7 '17 at 6:21

















        • it's help me by used line-height

          – koe
          Mar 7 '17 at 6:21
















        it's help me by used line-height

        – koe
        Mar 7 '17 at 6:21





        it's help me by used line-height

        – koe
        Mar 7 '17 at 6:21











        2














        Use



        #com_name
        word-break: break-word;
        white-space: normal






        share|improve this answer



























          2














          Use



          #com_name
          word-break: break-word;
          white-space: normal






          share|improve this answer

























            2












            2








            2







            Use



            #com_name
            word-break: break-word;
            white-space: normal






            share|improve this answer













            Use



            #com_name
            word-break: break-word;
            white-space: normal







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 7 '17 at 5:25









            Arun KasyakarArun Kasyakar

            59758




            59758





















                2














                Try this.



                .class_name 
                word-wrap: break-word;






                share|improve this answer





























                  2














                  Try this.



                  .class_name 
                  word-wrap: break-word;






                  share|improve this answer



























                    2












                    2








                    2







                    Try this.



                    .class_name 
                    word-wrap: break-word;






                    share|improve this answer















                    Try this.



                    .class_name 
                    word-wrap: break-word;







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 16 '18 at 0:39









                    Pang

                    6,9671665105




                    6,9671665105










                    answered Mar 7 '17 at 5:13









                    MominMomin

                    1,23021823




                    1,23021823





















                        1














                        I too faced this problem.You can use word-wrap,See my following example.



                        Like this you will get






                        #dob
                        font-size: 11px;
                        display: inline-block !important;*/
                        vertical-align: middle !important;*/
                        color: #365899;
                        cursor: pointer;
                        word-wrap: break-word;
                        width: 158px;

                        <div id="selectDob">
                        <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                        <option value="0" selected="1">Day</option>
                        </select>
                        <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                        <option value="0" selected="1">Month</option>
                        </select>
                        <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                        <option value="0" selected="1">Year</option>
                        </select>
                        <div id="dobContent">
                        <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                        </div>
                        </div>








                        share|improve this answer



























                          1














                          I too faced this problem.You can use word-wrap,See my following example.



                          Like this you will get






                          #dob
                          font-size: 11px;
                          display: inline-block !important;*/
                          vertical-align: middle !important;*/
                          color: #365899;
                          cursor: pointer;
                          word-wrap: break-word;
                          width: 158px;

                          <div id="selectDob">
                          <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                          <option value="0" selected="1">Day</option>
                          </select>
                          <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                          <option value="0" selected="1">Month</option>
                          </select>
                          <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                          <option value="0" selected="1">Year</option>
                          </select>
                          <div id="dobContent">
                          <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                          </div>
                          </div>








                          share|improve this answer

























                            1












                            1








                            1







                            I too faced this problem.You can use word-wrap,See my following example.



                            Like this you will get






                            #dob
                            font-size: 11px;
                            display: inline-block !important;*/
                            vertical-align: middle !important;*/
                            color: #365899;
                            cursor: pointer;
                            word-wrap: break-word;
                            width: 158px;

                            <div id="selectDob">
                            <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                            <option value="0" selected="1">Day</option>
                            </select>
                            <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                            <option value="0" selected="1">Month</option>
                            </select>
                            <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                            <option value="0" selected="1">Year</option>
                            </select>
                            <div id="dobContent">
                            <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                            </div>
                            </div>








                            share|improve this answer













                            I too faced this problem.You can use word-wrap,See my following example.



                            Like this you will get






                            #dob
                            font-size: 11px;
                            display: inline-block !important;*/
                            vertical-align: middle !important;*/
                            color: #365899;
                            cursor: pointer;
                            word-wrap: break-word;
                            width: 158px;

                            <div id="selectDob">
                            <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                            <option value="0" selected="1">Day</option>
                            </select>
                            <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                            <option value="0" selected="1">Month</option>
                            </select>
                            <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                            <option value="0" selected="1">Year</option>
                            </select>
                            <div id="dobContent">
                            <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                            </div>
                            </div>








                            #dob
                            font-size: 11px;
                            display: inline-block !important;*/
                            vertical-align: middle !important;*/
                            color: #365899;
                            cursor: pointer;
                            word-wrap: break-word;
                            width: 158px;

                            <div id="selectDob">
                            <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                            <option value="0" selected="1">Day</option>
                            </select>
                            <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                            <option value="0" selected="1">Month</option>
                            </select>
                            <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                            <option value="0" selected="1">Year</option>
                            </select>
                            <div id="dobContent">
                            <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                            </div>
                            </div>





                            #dob
                            font-size: 11px;
                            display: inline-block !important;*/
                            vertical-align: middle !important;*/
                            color: #365899;
                            cursor: pointer;
                            word-wrap: break-word;
                            width: 158px;

                            <div id="selectDob">
                            <select label="Day" name="birthdat_day" class="days" id="selectDateOfBirth">
                            <option value="0" selected="1">Day</option>
                            </select>
                            <select label="Month" name="birthday_month" class="months" id="selectDateOfBirth">
                            <option value="0" selected="1">Month</option>
                            </select>
                            <select label="Year" name="birthday_year" class="years" id="selectDateOfBirth">
                            <option value="0" selected="1">Year</option>
                            </select>
                            <div id="dobContent">
                            <a href="#" id="dob" data-toggle="popover">Why do I need to provide my date of birth?</a>
                            </div>
                            </div>






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 7 '17 at 5:13









                            user7397787user7397787

                            63731025




                            63731025





















                                1














                                 <html>
                                <head>
                                <style>
                                /*anchor tag*/
                                #com_name
                                font-size: 12px;
                                width: 50%;
                                white-space: normal


                                /*set width for first p tag*/
                                .first
                                width:8%;


                                /*set width, margin-top and margin-left for second p tag*/
                                .second
                                margin-left:8%;
                                margin-top:-33px;
                                width:32%;

                                </style>
                                </head>
                                <body>
                                <p class="first">Company name:</p>
                                <p class="second"> <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA
                                AND PACIFIC (RECOFTC)</a></p>
                                </body>
                                </html>





                                share|improve this answer

























                                • A little explanation would be helpful

                                  – Rohit Agre
                                  Mar 7 '17 at 5:33















                                1














                                 <html>
                                <head>
                                <style>
                                /*anchor tag*/
                                #com_name
                                font-size: 12px;
                                width: 50%;
                                white-space: normal


                                /*set width for first p tag*/
                                .first
                                width:8%;


                                /*set width, margin-top and margin-left for second p tag*/
                                .second
                                margin-left:8%;
                                margin-top:-33px;
                                width:32%;

                                </style>
                                </head>
                                <body>
                                <p class="first">Company name:</p>
                                <p class="second"> <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA
                                AND PACIFIC (RECOFTC)</a></p>
                                </body>
                                </html>





                                share|improve this answer

























                                • A little explanation would be helpful

                                  – Rohit Agre
                                  Mar 7 '17 at 5:33













                                1












                                1








                                1







                                 <html>
                                <head>
                                <style>
                                /*anchor tag*/
                                #com_name
                                font-size: 12px;
                                width: 50%;
                                white-space: normal


                                /*set width for first p tag*/
                                .first
                                width:8%;


                                /*set width, margin-top and margin-left for second p tag*/
                                .second
                                margin-left:8%;
                                margin-top:-33px;
                                width:32%;

                                </style>
                                </head>
                                <body>
                                <p class="first">Company name:</p>
                                <p class="second"> <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA
                                AND PACIFIC (RECOFTC)</a></p>
                                </body>
                                </html>





                                share|improve this answer















                                 <html>
                                <head>
                                <style>
                                /*anchor tag*/
                                #com_name
                                font-size: 12px;
                                width: 50%;
                                white-space: normal


                                /*set width for first p tag*/
                                .first
                                width:8%;


                                /*set width, margin-top and margin-left for second p tag*/
                                .second
                                margin-left:8%;
                                margin-top:-33px;
                                width:32%;

                                </style>
                                </head>
                                <body>
                                <p class="first">Company name:</p>
                                <p class="second"> <a id="com_name">REGIONAL COMMUNITY FORESTRY TRAINING CENTER FOR ASIA
                                AND PACIFIC (RECOFTC)</a></p>
                                </body>
                                </html>






                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Mar 7 '17 at 7:00

























                                answered Mar 7 '17 at 5:26









                                Sumit MehtaSumit Mehta

                                245




                                245












                                • A little explanation would be helpful

                                  – Rohit Agre
                                  Mar 7 '17 at 5:33

















                                • A little explanation would be helpful

                                  – Rohit Agre
                                  Mar 7 '17 at 5:33
















                                A little explanation would be helpful

                                – Rohit Agre
                                Mar 7 '17 at 5:33





                                A little explanation would be helpful

                                – Rohit Agre
                                Mar 7 '17 at 5:33

















                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42640472%2fcss-how-to-break-line-when-long-data%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Top Tejano songwriter Luis Silva dead of heart attack at 64

                                ReactJS Fetched API data displays live - need Data displayed static

                                政党