Can you help me with a width problem?

Discussion in 'CSS' started by ccano, Nov 1, 2006.

  1. #1
    Hi, I've got this script (Featured MP3 Player) and for some reason it is taking up the width of the entire page. I only want it to be 311px wide, though, so that the text can just wrap around it. I put it here just as a test:

    http://www.thebeatresource.com/simplesoapmaking.html

    Here's my code:

    and

    Anyone have any idea how I can fix this?

    Thanks in advance :)
     
    ccano, Nov 1, 2006 IP
  2. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Very simple solution:

    Swap your fmp_rotator for this one. You needed 'float:left;' in there.

     
    webdesigner, Nov 2, 2006 IP
  3. ccano

    ccano Peon

    Messages:
    211
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks, that works fine for my test page. I'm wondering, though, what if I were to distribute this code so that people could place it on their sites (on the left, center, right, whatever) without having to alter the code?

    Is there any way to stop it from pushing the text beneath it without defining a specific float left, middle, or right?

    Thanks :)
     
    ccano, Nov 2, 2006 IP
  4. ccano

    ccano Peon

    Messages:
    211
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Also, I've got some black text on the top of that MP3 player box that you can't see. But in the CSS I defined it as white, like so:

    #fmp_featured_mp3_players {
    color : #FFFFFF;
    font-family: Georgia;
    font-size: 14px;
    font-weight: bold;
    padding: 0px 0px 0px 9px;
    height: 20px;
    }

    Any idea why it doesn't show? Thanks :)
     
    ccano, Nov 2, 2006 IP
  5. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #5
    You have an extra ' } ' just above ' #fmp_featured_mp3_players '

    Get rid of that and it works fine... And i think if other people were to use it, they would have to define float either left or right
     
    webdesigner, Nov 2, 2006 IP