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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Question CSS - Image in Paragraph Help!!!

    Hello, what I am trying to accomplish is hard to explain so I'm going to give you guys/gals a link to help you understand what I'm asking:

    http://websitedesign.ashtonsanders.c...dent-text.html

    See on the right side of the page in the "About Me" section? What I'm trying to do on my own site is exactly what he did right there in regards to the text being wrapped around that small square logo. I'm trying to do this via CSS so no tables please!

    If you have any questions which would in turn help answer my question, please let me know!

    Thank you very much in advance!

    -Frank

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Ok, This is pretty simple:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <style type="text/css">
    #Container
    {
    	width: 400px;
    }
    #LeftSide
    {
    float: left;
    }
    #RightSide
    {
    float: right;
    width: 200px;
    border: 1px solid black;
    }
    #AboutMe
    {
    height: 300px;
    }
    #img_aboutme
    {
    float:left;
    }
    </style>
    </head>
    
    <body>
    <div id="Container">
    	<div id="LeftSide">
    		Some text here
    	</div>
    	<div id="RightSide">
    		<div id="AboutMe">
    			<img src="http://www.websitesinaflash.com/images/logos/logo4_square.jpg" id="img_aboutme" /> Some more text here hereSome more text here hereSome more text here hereSome more text here hereSome more text here here
    		</div>
    	</div>
    </div>
    </body>
    </html>
    This should work.
    Last edited by BarrMan; 10-07-2007 at 07:57 PM.

  • Users who have thanked BarrMan for this post:

    FADiJohn (10-07-2007)

  • #3
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thank you so much! It worked perfectly!

    I thought you had to use the 'display' property, making the image or the paragraph set to 'display:inline;'. But I guess not!

    Thanks again,
    -Frank

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Images are already set to 'inline' automatically.
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

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