Need help with blog CSS vs HTML

Discussion in 'CSS' started by Kat2, Jul 31, 2006.

  1. #1
    I have started a new blog and am experimenting with the posts' layout. I just tried using an align="left" image tag to put my text next to an image. That resulted in the next post partially being next to the image as well. So I put a br clear="all" tag after it, and now there's a huge white space underneath the post.

    http://www.upontherainbow.com/consumerthoughts/

    Can anyone tell me what's causing that huge white space?

    Here is the exact code from the post:

    <img src="http://www.upontherainbow.com/images/strawberrycream.jpg" align="left" />
    
    I haven't seen the other new flavors (Black Cherry French Vanilla and LimeBerry), but today I tried out the new Pepsi Jazz Strawberries &amp; Cream.&nbsp; It's very good for a diet pop - I couldn't even tell it was diet!&nbsp; It has the same note of bubblegum in the background that Pepsi Blue had... I don't know if that's a result of the sweetener they use, or a side effect of the flavorings.&nbsp; I would definitely buy it again!
    
    Picture courtesy of <a href="http://www.bevnet.com/reviews/Pepsi%5FJazz/">BevNet</a>.
    
    Technorati Tags: <a href="http://technorati.com/tag/pepsi" rel="tag">pepsi</a>, <a href="http://technorati.com/tag/jazz" rel="tag">jazz</a>, <a href="http://technorati.com/tag/taste%20test" rel="tag">taste test</a>, <a href="http://technorati.com/tag/" rel="tag"></a>
    <br clear="all" />
    Code (markup):

     
    Kat2, Jul 31, 2006 IP
  2. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try "clear: both;" instead of all
     
    Gordaen, Jul 31, 2006 IP
  3. Kat2

    Kat2 Well-Known Member

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Well, that gives me the original problem again... the 2nd post wraps next to the image from the first. I left it so you can see what I mean.
     
    Kat2, Jul 31, 2006 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Will you please give us a link to the page?

    cheers,

    gary
     
    kk5st, Jul 31, 2006 IP
  5. Kat2

    Kat2 Well-Known Member

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #5
    It's in the first post.
     
    Kat2, Jul 31, 2006 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    I must have suffered a bad attack of the stupids. :oops: I swear I didn't see a link! Really.

    Rather than explicitly clearing the floats, cause the float's parent to enclose it.
    
    .post { 
        overflow: hidden;  /*causes modern browsers to enclose child floats*/
        display: inline-block;  /*step one of IE hasLayout tripswitch*/
    	position: relative;  /*offsets removed as redundant*/
    	margin: 10px 10px 10px 20px;
    	text-align: left;
        }
    
    .post {
        display: block;  /*step two of hasLayout tripswitch*/
        }
    Code (markup):
    cheers,

    gary
     
    kk5st, Aug 1, 2006 IP
  7. Kat2

    Kat2 Well-Known Member

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #7
    That fixed it, thanks so much!
     
    Kat2, Aug 1, 2006 IP