Foros aprenderaprogramar.com

Aprender a programar => Aprender a programar desde cero => Mensaje iniciado por: tata en 02 de Mayo 2013, 17:15

Título: css Por qué no me sale un div (caja o box) junto al otro
Publicado por: tata en 02 de Mayo 2013, 17:15
Hola a todos/as:En la web anterior lo pude hacer pero en esta no me sale;estoy trabajando para que 2 cajas salgan una al lado de la otra peo por mas que lo intento no puedo y he revisado y recontrarevisado y nada...aqui les dejo lo de html

 
            <div id="services">
                     <p>If you are looking for excelent services</br>
                and people-friendly approach</br>
                then you've come to the right place.</br>
                </br>
                Imperio Cleaning Services,our ultimate goal</br>
                is to serve you and make</br>
                your experience with us pleasent one.</p></div>
                </br></br>
                
                            
               <h4>cleaning services</h4> 
          <div id="olivia">
                  <p>-Bathroom Detail cleans.</br>
                        -Kitchen and Eating areas detail cleans.</br>               
                   -Sleeping and living Area cleans.</br>
                  -Office cleaning.</br>
                  -Trash collection and disposal.</br>
                  -Upholstery cleaning.</br></p></div>
                  </br></br>
                  
         <div id="nando">
                  <p>-Recurring cleaning offered.</br>
                   -Friendly,professional services.</br>
                  -Punctual Staff.</br>
                  -Best prices in North Texas.</br>
                  -24 hours Services.</br>
                  -Available References-home-commercial and apartments units.</p></div>
                  
         </section> 
               y aqui lo que hice con css3
     padding:0.5%;
}    
#services{
          color:#000000;
      display:inline;
      font-family:Impact;
      font-size:1.5em;
      text-align:center;
}
#olivia{
      background-color:#F4FA58;
     border-radius:1.0em;
     border:0.5em dotted #FF0000; 
     display:inline-block;
     font-family:Impact;
     font-size:1.5em;
     margin-left:2%;
     margin-right:2%;
     margin-top:2%;
     padding:0.5em;
     text-align:center;
    
     width:40%;
}
#nando{
       background-color:#F4FA58;
      border-radius:1.0em;
      border:0.5em dotted #FF0000;
      
      display:inline-block;
      font-family:Impact;
      font-size:1.5em;
      margin-left:2%;
      margin-right:2%;
      margin-top:2%;
      padding:0.5em;
      text-align:center;
      vertical-align:top;
      width:40%;


Gracias de antemano por sus ayudas
Título: Re:Porque no me sale un box junto al otro
Publicado por: javi in the sky en 03 de Mayo 2013, 00:19
Hola tata! Prueba de esta forma:

Código: [Seleccionar]
<html>

<head>

<title>Título de la página web</title>

<style type="text/css">

body {
padding:0.5%;
}

#services{
          color:#000000;
      display:block;
      font-family:Impact;
      font-size:1.5em;
      text-align:center;
}
#olivia{
      background-color:#F4FA58;
     border-radius:1.0em;
     border:0.5em dotted #FF0000;
     float: left;
     font-family:Impact;
     font-size:1.5em;
     margin-left:2%;
     margin-right:2%;
     margin-top:2%;
     padding:0.5em;
     text-align:center;
   
     width:40%;
}
#nando{
       background-color:#F4FA58;
      border-radius:1.0em;
      border:0.5em dotted #FF0000;
      float: left;
     
      font-family:Impact;
      font-size:1.5em;
      margin-left:2%;
      margin-right:2%;
      margin-top:2%;
      padding:0.5em;
      text-align:center;
      vertical-align:top;
      width:40%;
  }

</style>

</head>

<body>

<section>
<div id="services">
                     <p>If you are looking for excelent services</br>
                and people-friendly approach</br>
                then you've come to the right place.</br>
                </br>
                Imperio Cleaning Services,our ultimate goal</br>
                is to serve you and make</br>
                your experience with us pleasent one.</p></div>
               
               
                           
               
   
   
          <div id="olivia">
                  <p>-Bathroom Detail cleans.</br>
                        -Kitchen and Eating areas detail cleans.</br>               
                   -Sleeping and living Area cleans.</br>
                  -Office cleaning.</br>
                  -Trash collection and disposal.</br>
                  -Upholstery cleaning.</br></p></div>
                 
                 
         <div id="nando">
                  <p>-Recurring cleaning offered.</br>
                   -Friendly,professional services.</br>
                  -Punctual Staff.</br>
                  -Best prices in North Texas.</br>
                  -24 hours Services.</br>
                  -Available References-home-commercial and apartments units.</p></div>
                  </div>
         </section>


</body>

</html>