www.webdeveloper.com
Results 1 to 5 of 5

Thread: Two DIVs next to each other?

  1. #1
    Join Date
    Apr 2011
    Posts
    5

    Two DIVs next to each other?

    Hello,

    I'm trying to setup two image div tags, both containing images, next to each other.

    I tried 'float:left;' but it doesn't seem to work...

    The CSS I tried is:
    HTML Code:
    div.image
    {
    	float: left;
    }
    div.image2
    {
    	float: left;
    }
    div.image img
    {
    	display: inline;
    }
    div.image2 img
    {
    	display: inline;
    }
    Help, please!

  2. #2
    Join Date
    Apr 2011
    Posts
    46
    can you paste more code pls?

  3. #3
    Join Date
    Apr 2011
    Posts
    5
    What code exactly do you want me to post?

  4. #4
    Join Date
    Feb 2010
    Location
    England
    Posts
    122
    Code:
    #leftbit
       {
       width: 100px;
       height: 100px;
       border: 1px solid #000;
       float: left;
       }
    
    #rightbit
       {
       width: 100px;
       height: 100px;
       border: 1px solid #000;
       float: left;
       }
    And the HTML:

    HTML Code:
    <div id="leftbit"></div>
    
    <div id="rightbit"></div>
    
    <br style="clear: both;" />
    Or you can neaten it up by giving the BR a class.
    Regards,

    Haze

  5. #5
    Join Date
    Apr 2011
    Posts
    5
    @Haze1434 : Thanks a ton !
    It worked !
    Enjoy !

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles