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 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    86
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question CSS - Text and Image Align (Easy i think)

    Hi, just started now to understand how CSS layouts work and im making a site just using css.. no tables yipi for me!

    i have put a frame around my images and some information text below the picture. now i want more information about that picture on the right side of the picture.

    here is the css:

    #partners
    {
    width: 150px;
    margin: 20px 10px 10px 0;
    padding: 8px 8px 15px 8px;
    border: 1px solid #000;
    display: block;
    background-color: #a8a8a8;
    text-align: center;
    align: left;
    }

    #partners img
    {
    border: 1px solid #000;
    }

    and here is the HTML

    <div id="partners">
    <img src="DB.jpg">
    Lorem lorem disat sium.
    </div>
    </p>Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium. Lorem lorem disat sium.</p>


    Should think its easy, but i cant figure it out.
    I dont want the text to be inside to the right of the "picture frame" but on the outside (the text would then have no grey background)

    hope someone can help!

    THANKS!

  • #2
    Regular Coder BonRouge's Avatar
    Join Date
    Mar 2006
    Location
    Sendai, Japan
    Posts
    328
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this:
    Code:
    #partners {
    float:left;
    }

  • #3
    New Coder
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    86
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks but i worked it out in the end... needed to add another 2 divs to get it all working fine...


  •  

    Posting Permissions

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