width problem

Discussion in 'CSS' started by vfistri1, Jul 16, 2010.

  1. #1
    since i am coding for some cms that word "mirko" can be longer and i want that white background to be as long as word is.
    with max width defined as it is for example 100px.

    here is the code:
    
    <div style="width:400px; height:600px; background-color:green;">
    	<div style="width:300px; height:200px; background-color:#03F;">
        		    <div style=" background-color:white;max width:100px; "> mirko </div> 
        </div>
    </div>
    
    Code (markup):
    ps. thx in advance for reply
     
    vfistri1, Jul 16, 2010 IP
  2. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #2
    
    <div style="width:400px; height:600px; background-color:green;">
    	<div style="width:300px; height:200px; background-color:#03F;">
        		    <span style=" background-color:white;"> mirko </span> 
        </div>
    </div>
    
    Code (markup):
     
    bhuthecoder, Jul 16, 2010 IP
  3. pmwow

    pmwow Member

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    max_width param not support ie
     
    pmwow, Aug 2, 2010 IP