Div and making two elements alignment question

Discussion in 'Web Design and Development' started by kitki83, Nov 15, 2007.

  1. kitki83 macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #1
    I am making a CSS website, I want to be able to organize images and body of copy to be side to side but currently its top(image) and bottom(text) layout. I wanted to know how can I make them align side by side.

    Thank you

    ps. Can it be with floats?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Without seeing any code I'd say floats would be an option. If you can provide the code people might be able to give further advice.
     
  3. kitki83 thread starter macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #4
    PHP:
    <div>
    <
    ul class="hoverbox" style="margin: -1em 0 -2.8em 0;"><li>
          <
    a href="#"  style="color:#333333; display: inherit; font-size: 
    1.5em;"
    ><img src="../images/imagelogo.jpg" alt="Image"   /><img 
    src
    ="../images/image.jpg" alt="image" class="preview" /></a></li>
         </
    ul>

    <
    p><em>Class aptent taciti sociosqu ad litora torquent per conubia nostra,
     
    per inceptos hymenaeosQuisque mattis tempus massaSed variusQuisque
     eu turpis
    Duis luctus est sit amet purusPraesent sem liberoconvallis ut,
     
    suscipit etmolestie eunullaNunc placerat gravida felisNunc</p>
    </
    div>
    Hope this makes it clear if the image here how it looks like, blurred personal information but you can tell how the images are above the its description text
    The image is CSS hover over deal, in case anyone wanted to know.

    [​IMG]

    Thank you,
    RM


    ps. I got it to work, it was a typo on <br /> and copying and pasting it that caused the alignment issues
     

Share This Page