prevent text to slide from a div

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • haimski
    New Member
    • Mar 2008
    • 6

    prevent text to slide from a div

    hello,
    i have created a div with a text inside it and i gave it a width.
    when i put a long text line inside it without space, the text is sliding out of the div.

    does anybody knows how do i prevent the text slide that it will brake the word when it gets to the edge of the div.


    thx.
  • Death Slaught
    Top Contributor
    • Aug 2007
    • 1137

    #2
    Please provide your code or a link to a test site.

    Thanks,
    {\_/}
    (' . ')
    (")[DEATH](")
    (")(")

    Comment

    • hsriat
      Recognized Expert Top Contributor
      • Jan 2008
      • 1653

      #3
      provide min-width instead of width.

      Comment

      • Death Slaught
        Top Contributor
        • Aug 2007
        • 1137

        #4
        min-width doesn't exist in IE though....

        Thanks,
        {\_/}
        (' . ')
        (")[DEATH](")
        (")(")

        Comment

        • hsriat
          Recognized Expert Top Contributor
          • Jan 2008
          • 1653

          #5
          ohh... I never knew that.

          I hate IE.

          Comment

          • Death Slaught
            Top Contributor
            • Aug 2007
            • 1137

            #6
            I'm fairly certain that it's min-width that or it's min-height... or both. I'll check in a moment.

            Thanks,
            {\_/}
            (' . ')
            (")[DEATH](")
            (")(")

            Comment

            • Death Slaught
              Top Contributor
              • Aug 2007
              • 1137

              #7
              Found it:

              Originally posted by drhowarddrfine
              Height does not work correctly in IE. IE treats height as 'min-height'. And, as you might expect, min-height doesn't work at all in IE.
              Thanks,
              {\_/}
              (' . ')
              (")[DEATH](")
              (")(")

              Comment

              • haimski
                New Member
                • Mar 2008
                • 6

                #8
                here's the code

                guy, thx for the comments,

                an example code of what my problem is:

                just copy and paste it.
                Code:
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                <head>
                  <title>ten la ba rosh</title>
                  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
                </head>
                <body>
                <h1>script.aculo.us test file</h1>
                
                <div style="width: 100px; border: 1px solid; float: left;">	
                	<div style="float: left; ">
                	glskd l;sjk fg sjdjs  dkl; gj slkdgskldgs kldjf
                	fgkl;sjdf;gklsjdf;gjks d;fklgjsdlkf;gjsdkl;fgs
                	dfgsdklfgjlk;sgjskl;dgh jksl;dhfgjsldhfgjklshdfgjkshdfg\
                	sdfgsdhfgjkl;sdhfg;jsldhfgs
                	dfghsdkflghsdfjlghsdjlghuitghsdfhgsjlthgsuptghsdj;fghsjdfghsdufghs
                	fgshdlfghs;dfjgs
                	</div>
                </div>
                
                </body>
                </html>
                Last edited by eWish; May 28 '08, 03:15 AM. Reason: Please use code tags

                Comment

                • hsriat
                  Recognized Expert Top Contributor
                  • Jan 2008
                  • 1653

                  #9
                  Oh... so you mean by including a div in another div of fixed width?

                  Comment

                  • haimski
                    New Member
                    • Mar 2008
                    • 6

                    #10
                    sorry for the long time...

                    yes i mean a div within a div, and when i enter a text without any space between the words.

                    i am not sure that it is possible, but maybe i am missing something, or there is a hack.

                    thx anyway for all the replys.

                    Comment

                    Working...