Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: Help with floating...

  1. #1
    Senior Member splinter's Avatar
    Join Date
    Jul 2003
    Posts
    118

    Help with floating...

    On my site http://www.gamehideout.co.uk/ I am trying to get the image in the same box as "Testing, testing." while being on the right-hand side of the box (where it currently is).

    Code:
    <div class="context">
    [img]thumb_gen.php?forum.jpg[/img]
    Testing, testing. 
    </div>
    Code:
    #content .top .context img {
    border: 1px #CCCCCC dashed;
    padding: 1px;
    float: right;
    }
    What's up and how do I fix it?

  2. #2
    Senior Member splinter's Avatar
    Join Date
    Jul 2003
    Posts
    118
    It's ok. I sort of solved it:

    Code:
    <div class="top">
    
    <div class="header">latest update - 12/09/04</div>
    
    <div class="context">
    
    
    This site is very incomplete but all the links work so you can take a look around. Not much content yet though.
    Make sure to check out the forum as it has become very popular!</p>
    [img]thumb_gen.php?forum.jpg[/img]
    </div>
    
    </div>
    Code:
    #content .top .context {
    border: 1px #CCCCCC dashed;
    border-top: 0px;
    padding: 3px;
    text-align:right;
    }
    #content .top .context img {
    border: 1px #CCCCCC dashed;
    padding: 1px;
    margin: 3px;
    }
    #content .top .context p {
    text-align: left;
    float: left;
    margin: 0px;
    }
    This will work until the text goes past the image.

    Basically what I've done is instead of the box getting it's height from the text it is getting it from the image. If the text goes beyond the image though, the text will overflow.

  3. #3
    Senior Member splinter's Avatar
    Join Date
    Jul 2003
    Posts
    118
    Actually. I lie.

    The problem I now face is the image goes beneath the text. I can't put float: right; in the image class as that brings me to the original problem.

    :(

  4. #4
    Senior Member splinter's Avatar
    Join Date
    Jul 2003
    Posts
    118
    I figured it out. I'm not going to be able to tell you exactly how I did it as I made lots of little changes and I've forgotten how much different the code is.

    I'll provide the two pieces of code now though for you to analyse. The main bit was to have the image tag before the text.

    Code:
    <div class="context">
    
    
    [img]thumb_gen.php?forum.jpg[/img]
    This site is very incomplete but all the links work so you can take a look around. Not much content yet though.
    Make sure to check out the forum as it has become very popular!</p>
    </div>
    Code:
    #content .top .context {
    border: 1px #CCCCCC dashed;
    border-top: 0px;
    padding: 3px;
    float: left;
    margin-bottom: 5px;
    }
    #content .top .context img {
    border: 1px #CCCCCC dashed;
    padding: 1px;
    margin: 3px;
    float: right;
    }
    #content .top .context p {
    margin: 0px;
    }

Similar Threads

  1. CSS floating div problem
    By brando in forum Accessibility and Usability Forum
    Replies: 2
    Last Post: 07-08-2007, 03:13 PM
  2. Floating Adverts and SEO
    By WomenXtra in forum Search Engine Optimization Forum
    Replies: 3
    Last Post: 08-08-2006, 04:00 AM
  3. Floating Ice Nav
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 02-22-2005, 10:30 AM
  4. Floating Orb
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 12-15-2004, 05:31 PM
  5. Floating boxes with CSS
    By labrynth_of_fire in forum Web Programming Discussion Forum
    Replies: 6
    Last Post: 11-25-2003, 02:47 PM

Posting Permissions

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