Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7

Thread: Aligning images

  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Hello all,

    I'm designing a site with social buttons on, sorted everything apart from aligning them and it's driving me nuts!

    I've included the code below, it's pretty simple.... three logos that I want to appear in a row on the left hand side of the page.

    The problem is they only appear on the right and I can't get them to move, I've even tried making an ul and nothing.

    I've tried Margins and padding in css but it doesn't work.

    Know there will be a simple explanation so would really appreciate some help on this...

    <div id="social">

    <h2>
    <img src="Images/fb logo.png">
    <img src="Images/like button.jpg">
    <img src="Images/Twitter logo.jpg"
    </h2>

    </div>


    Thanks,
    John

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Show us the CSS your are using for the "social" div.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    <div id="social">

    <h2>
    <img src="Images/fb logo.png"/>
    <img src="Images/like button.jpg"/>
    <img src="Images/Twitter logo.jpg"/>
    </h2>

    </div>
    your tags wer not closed

    while($get_it !== true){ continue; }

  5. #4
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    Dorky, it would still rendered without the /
    We need to see the CSS for the DIV before we can help

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    You also don't need the h2 tag. Images can be included in any block-level element, be it a div, a paragraph, a table cell, or whatever. That might be your problem there. Now, if you have the H2 tag there for SEO reasons, you may as well get rid of it since you're not "optimizing" anything useful.

    Show us the CSS for your H2 as well if getting rid of it doesn't solve your problem.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Member surfbouy's Avatar
    Join Date
    Dec 2010
    Location
    Noosa, Sunshine Coast, Queensland, Australia
    Posts
    46
    Member #
    25747
    Liked
    3 times
    try giving them a class

    I too would suggest taking them out of the h2
    <div id="social">
    <img src="Images/fb logo.png" class="socialImage" />
    <img src="Images/like button.jpg" class="socialImage" />
    <img src="Images/Twitter logo.jpg"class="socialImage" />
    </div>
    then a css class of
    #social .socialImage{float:left;}
    Decide then if you want them to display inline or in a block and do your thing with the css.
    You may then need to add a clearfloat..
    All the best

  8. #7
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Thanks very much, all worked out...
    Adding the images to link through to both pages so no copyright issues....


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:06 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com