1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

vertical align

Discussion in 'CSS' started by ssimon171078, Apr 27, 2015.

  1. #1
    i need to align horizontal of squares my html code :
    <!DOCTYPE html>
    <html>
    <head>
        <title>Playing with adding numbers</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script type="text/javascript" src="game.js"></script>
        <link rel="stylesheet" href="style.css">
    
    </head>
    <body >
    <p id="text">Add three numbers that their outcome will be equal to 100 !!!!</p>
    
    <div id="aa">
        <p>10</p>
        <p>40</p>
        <p>50</p>
        <p>300</p>
      
    
    </div>
    
    </body>
    </html>
    HTML:
    my style.css:

    body
    {
       margin: 0;
       padding: 0;
       font-family  : Arial;
       font-size  : 10pt;
       background-color: pink;
    
     
       }
     
    #text {
      font-size  : 14pt;
      margin:center;
      text-align: center;
      background-color: aqua;
       border: 0.2em solid chartreuse;
    
    }
    #aa p {
      
        width: 100px;
        height: 100px;
        background: red;
      
      
        }
    Code (CSS):

     
    Last edited: Apr 27, 2015
    ssimon171078, Apr 27, 2015 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Not sure what you mean by "squares", but pt metric containers, px metric fonts, div around a obvious header or paragraph mated to paragraphs around content that quite obviously isn't makes your markup almost as big a gibberish as the CSS.

    You might want to learn how to use HTML and CSS properly before you start playing with bloated garbage like jQuery or trying to style said markup.
     
    deathshadow, Apr 27, 2015 IP