1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTML help with 2 columns

Discussion in 'BlackHat Lounge' started by BlackxHat, May 29, 2012.

  1. BlackxHat

    BlackxHat Power Member

    Joined:
    Oct 6, 2009
    Messages:
    591
    Likes Received:
    78
    I'm using this code for a two column lay out of text
    Code:
    <div style="float: left;">text1</div> <div style="float: left;">text2</div>
    
    How can I make the column on the right side, move more to the right?
     
  2. a_z_0_9

    a_z_0_9 Junior Member

    Joined:
    Jul 18, 2011
    Messages:
    110
    Likes Received:
    21
    Last edited: May 29, 2012
  3. BlackxHat

    BlackxHat Power Member

    Joined:
    Oct 6, 2009
    Messages:
    591
    Likes Received:
    78
    oh ok but how do i move a little bit to the left or right now?
     
  4. devbrah

    devbrah Junior Member

    Joined:
    Oct 10, 2011
    Messages:
    110
    Likes Received:
    14
    <div style="float:left; margin-right: 20px;">text 1</div >

    That will push anything to the right over 20 pixels

    Sent from my HTC Incredible S using Tapatalk 2
     
  5. madoctopus

    madoctopus Supreme Member

    Joined:
    Apr 4, 2010
    Messages:
    1,249
    Likes Received:
    3,498
    Occupation:
    Full time IM
    you're so lazy... there is a gazillion tutorials on CSS positioning and float and there are IRC channels where you can get an explanation in 1 minute flat. As a matter of fact just doing trial and error for 5min would give you the solution. Yet you post in a SEO forum.
     
  6. jeanlance

    jeanlance Power Member

    Joined:
    Mar 5, 2009
    Messages:
    796
    Likes Received:
    109
    Occupation:
    Web Designer, VCC supplier
    Location:
    Some where between heaven and hell
    Home Page:
    Try to make the second div florat:right;

    Or you can give padding-left for second div