Center Google Maps inside a cell

Discussion in 'CSS' started by LisaCSS, Nov 7, 2008.

  1. #1
    Hello, friends

    I have placed a google map a inside a cell and what I want to do is to centre it.

    I have proved several solutions, but none works.:confused:

    This is the code...


    <table> 
    <tr> 
        <td colspan="2" class="mapa" > 
            <?php HTML_CLIE::showGoogleMaps($myClie, $config); ?> 
                     
        </td> 
    </tr> 
    
    </table>
    
    PHP:
    Can anybody help me?
    Please, see the picture.


    This is one of the CSS codes I've used.

    .mapa{

    background:#666666;
    color: #FFCC33;
    border: thin solid;
    border-width: 2px;
    height: 100%;
    width:100%;

    }

    Kind regards,
    Lisa
     

    Attached Files:

    LisaCSS, Nov 7, 2008 IP
  2. vlad230

    vlad230 Active Member

    Messages:
    544
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    95
    #2
    What does class "mapa" contain?
     
    vlad230, Nov 7, 2008 IP
  3. Arwen

    Arwen Peon

    Messages:
    150
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <table>
    <tr>
    <td colspan="2" class="mapa" align="center">

    <?php HTML_CLIE::showGoogleMaps($myClie, $config); ?>

    </td>
    </tr>

    </table>

    would do the job if class="mapa" in stylesheet doesn't have any allignment assigned
     
    Arwen, Nov 7, 2008 IP
  4. vlad230

    vlad230 Active Member

    Messages:
    544
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    95
    #4
    Or you could use:

    text-align: center;

    in the "mapa" class :)
     
    vlad230, Nov 8, 2008 IP
  5. pozer

    pozer Active Member

    Messages:
    603
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #5
    Looking at your picture looks like you could have a left and top padding inside table cell, try putting
    <table> 
    <tr> 
        <td colspan="2" class="mapa" style="padding:0;"> 
            <?php HTML_CLIE::showGoogleMaps($myClie, $config); ?> 
                     
        </td> 
    </tr> 
    
    </table>
    HTML:
     
    pozer, Nov 13, 2008 IP