Topic: Critique use of <br/> (Page 1 of 1)  | 
  |
|---|---|
| 
       Bipolar (III) Inmate From: Phoenix  | 
    
       
  posted 03-23-2009 06:15
      
      I feel like the slum of the earth when I lay down a <br/> tag.  But should I?  Please consider the following, a link which I desire to contain 3 distinct lines:  | 
  
| 
       Paranoid (IV) Inmate From: London  | 
    
       
  posted 03-23-2009 10:19
      
      Hmm, I guess I'm not sure of what your question really is, but your use of the <br /> tag is fine, and if you don't want the lines to wrap then don't use the <br /> tag.  | 
  
| 
       Paranoid (IV) Inmate From: Norway  | 
    
       
  posted 03-23-2009 12:01
      
      Actually you can also use the white-space:pre-something; to break the text on the \n characters and have the following markup: code: <li class="nav"><a href="#">Manage your event</a></li> 
 code: li.nav a
{
white-space:pre;
text-transform:capitalize;
}
  | 
  
| 
       Bipolar (III) Inmate From: Phoenix  | 
    
       
  posted 03-23-2009 17:37
      
      white-space  | 
  
| 
       Bipolar (III) Inmate From: Phoenix  | 
    
       
  posted 03-23-2009 17:48
      
      Dohh!  as quickly as I love that solution poi, i hate it.  I failed to mention that the text needs to be centered, but now I have a jagged arrangment of words on each line.   This is not going to work.  It seems I am forced to go with something like:  | 
  
| 
       Paranoid (IV) Inmate From: Norway  | 
    
       
  posted 03-23-2009 18:30
      
      Sorry but the semantic of that last snippet of HTML is rubbish. Plus I'm pretty sure that you can't put a block element such as a UL inside an A element. code: <li class="nav"><a href="#">Manage <span>your</span> event</a></li> css code: li.nav span{ display:block; clear:both; } | 
  
| 
       Bipolar (III) Inmate From: Phoenix  | 
    
       
  posted 03-23-2009 19:27
      
      Hmmm... I like the use of Span!  Bettern than <br/> in my opinion, and can be styled from CSS, and eliminates the extra UL LI markup, which I agree is horrid.  | 
  
| 
       Paranoid (IV) Inmate From: Florida  | 
    
       
  posted 03-23-2009 20:45
      
      code: float: left; width: 0; text-align: center;  | 
  
| 
       Bipolar (III) Inmate From: Phoenix  | 
    
       
  posted 03-23-2009 21:52
      
      reisio:   not sure which tag you intend to apply your style to, if the <li> tag, the width is a requirement (I have a border around the object, and equally width spaced box like appearance).  Hmm, maybe the <a> tag.  Let me try that. code: ul.navigation li a
{
	display:block;
	width:0;
	text-align:center;
}
ul.na | 
  
| 
       Paranoid (IV) Inmate From: Florida  | 
    
       
  posted 03-24-2009 02:05
      
      Muah!  code: a {
	display: block;
	text-align: center;
	white-space: pre;
}
?
				<a href="#">blah
<!--					 -->asdfasdfblah
<!--					 -->blah</a> | 
  
| 
       Paranoid (IV) Inmate From: Florida  | 
    
       
  posted 03-24-2009 02:14
      
      Just use display: block; text-align: center; and set the width to be smaller than the length of the shortest word.  |