I have a web page that displays a pdf document. In the header there is an image and an h1 tag that contains a name. When the name is too long, it gets cut off. How can I force it to wrap to the next line instead so that the entire name is displayed? I tried inserting a style="white-space:normal" but it doesn't help. Any suggestions?
            Asked
            
        
        
            Active
            
        
            Viewed 4.7k times
        
    22
            
            
        - 
                    2Can you post some example code that we look at to get a better idea of the problem? – mrvisser Dec 16 '09 at 19:56
 
5 Answers
16
            
            
        It should have the combination of two:
word-wrap: break-word;
white-space: normal;
thanks to Tor and Alex :)
        justnajm
        
- 4,422
 - 6
 - 36
 - 56
 
8
            
            
        h1 tags wrap by default. If they're not, something in your CSS is overriding that default behaviour. If you can post a link to the site, we can quickly help you out. You might want to consider installing Firebug for Firefox - it'll let you right-click on the h1 and view what styles are being applied to it, and from where they come.
        ceejayoz
        
- 176,543
 - 40
 - 303
 - 368
 
1
            
            
        Is the header contained wihtin another element such as a div? If so, check the overflow for that element and/or try setting it to visible like this:
style="overflow:visible;"
        Sonny Boy
        
- 7,848
 - 18
 - 76
 - 104
 
1
            
            
        - 
                    This does not answer the question at all. It is not even related to the question. – stackprotector Sep 18 '22 at 16:39