div problem

Discussion in 'CSS' started by dizyn, Nov 19, 2008.

  1. #1
    if i use following code its creates problem

    I want it like:
    Radio button then text, radio button then text etc

    
    <style type="text/css">
    #outpsp{margin:0px auto; width:330px;padding:2px;background:#FFE5E5;border: 1px solid #FFB2E5;}
    .rad1{	width:30px; float:left; height:25px;}
    .rad2{	width:30px;float:left;height:25px;}
    
    </style>
    
    
    <div id="outpsp">
    00
    	<div class="rad1"><input name="radiobutton" type="radio" value="1" /></div>
    	<div class="rad2"><input name="radiobutton" type="radio" value="2" /></div>
    
    </div>
    
    Code (markup):
    But when i remove the radiobutton it works fine

    like:
    <style type="text/css">
    #outpsp{margin:0px auto; width:330px;padding:2px;background:#FFE5E5;border: 1px solid #FFB2E5;}
    .rad1{	width:30px; float:left; height:25px;}
    .rad2{	width:30px;float:left;height:25px;}
    
    </style>
    
    
    <div id="outpsp">
    00
    </div>
    Code (markup):

    I don't know what's the problem
     
    dizyn, Nov 19, 2008 IP
  2. dizyn

    dizyn Active Member

    Messages:
    251
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Got the solution

    I think it will work with : overflow:hidden;
     
    dizyn, Nov 19, 2008 IP
  3. baskaran_ramasamy

    baskaran_ramasamy Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi,
    try with server controls man(asp, jsp)!
     
    baskaran_ramasamy, Nov 22, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    dizyn: you mean the 00 text you want after the radios?

    You should have the 00's in a tag too-- a <p> or a <span> or something.

    Or, you could have just set it after the radios.

    
    <input name="radiobutton" id="radio1" type="radio" value="1" /><label for="radio1">Text here</label>
    <input name="radiobutton"  id="radio2" type="radio" value="2" /><label for="radio2">Text text text</label>
    
    Code (markup):
     
    Stomme poes, Nov 22, 2008 IP
  5. Tejbusiness

    Tejbusiness Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hello dizyn

    your div problem is slow below code:

    ------------

    code:
    ------
    <style type="text/css">
    #outpsp{
    width:330px;
    padding:2px;
    background:#FFE5E5;
    border: 1px solid #FFB2E5;
    display: block;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    float: left;
    }
    .rad1{ width:30px; float:left; height:25px;}
    .rad2{ width:30px;float:left;height:25px;}

    </style>


    <div id="outpsp">
    00
    <div class="rad1"><input name="radiobutton" type="radio" value="1" /></div>
    <div class="rad2"><input name="radiobutton" type="radio" value="2" /></div>

    </div>

    If you have any query so contact me

    Best Regards
    TejBussiness
     
    Tejbusiness, Nov 25, 2008 IP