Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    align div's and images horizontally

    I have a website created with drupal and I want a group of banners showed horizontal, and another vertical. How can I make this just with CSS? The one I want horizontall looks like:
    Code:
    <div id="block-ad-1" class="block block-ad">
      <h2 class="title"/>
      <div class="content">
        <div id="group-id-tids-1" class="advertisement group-tids-1">
          <script src="" type="text/javascript"/>
          <div id="ad-16" class="image-advertisement">
            <a title="" href="">
              <img height="50" width="125" alt="" src=""/>
            </a>
          </div>
          <div id="space-1-1" class="advertisement-space"/>
          <div id="ad-14" class="image-advertisement">
            <a title="" href="">
              <img height="50" width="60" alt="" src=""/>
            </a>
          </div>
          <div id="space-1-2" class="advertisement-space"/>
          <div id="ad-18" class="image-advertisement">
            <img height="50" width="63" alt="" src=""/>
          </div>
          <div id="space-1-3" class="advertisement-space"/>
          <div id="ad-12" class="image-advertisement">
            <img height="50" width="44" alt="" src=""/>
          </div>
          <div id="space-1-4" class="advertisement-space"/>
          <div id="ad-13" class="image-advertisement">
            <a title="" href="">
              <img height="50" width="46" alt="" src=""/>
            </a>
          </div>
        </div>
      </div>
    </div>
    thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I have a website created with drupal and I want a group of banners showed horizontal, and another vertical.
    Could you specify them from the above code?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You have many errors in your code. Look here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    At last I managed to do this using:

    Code:
    .group-tids-2 .image-advertisement {
      text-align: center;
    }
    
    .group-tids-1 .image-advertisement {
      float: right;
      padding: 3px;
    }
    One "block" horizontal" and the other "vertical".

    I will check for the errors that appear when validating


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •