1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I don't have any skillz

Discussion in 'CSS' started by J8Diamonds, Oct 24, 2007.

  1. #1
    Okay here is what I'm doing. So far, so good, kinda. (actually let me know if this works in IE for you, cos it doesn't always for me)

    I want to make a white text box under the main zombie image with the same 15px border.

    Here's my left hand CSS

    #left {
    width:480px;
    height:auto !important;
    height:480px;
    min-height:480px;
    background:#000000;
    float:left;
    }

    #left img {
    margin:15px;
    }

    #text {
    width:480px
    height:auto !important;
    height:100px
    min-height:100px
    background:#ffffff
    float:left;
    margin:15px


    And the corresponding HTML

    <div id="left">
    <img src="images/zombie_450x338.jpg" width="450" height="338" alt="Full View" />


    <div id="text">
    <p>Here be text!</p>
    </div>
    </div>


    As I'm lacking in mad skillz I don't know what I'm doing wrong, any help appreciated.
     
    J8Diamonds, Oct 24, 2007 IP
  2. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need an ending semicolon on all of your css lines in #text and a closing bracket for #text. I can't even tell anything until you first style things in a way the browser can understand. Basically, right now, it should be ignoring all of your styles in #text
     
    Arnold9000, Oct 24, 2007 IP
    J8Diamonds likes this.
  3. J8Diamonds

    J8Diamonds Active Member

    Messages:
    354
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Which it is.

    Doh!

    Thanks, actually fixed it before I popped back but that was pretty much the problem. Cheers +.
     
    J8Diamonds, Oct 24, 2007 IP
  4. jBud

    jBud Peon

    Messages:
    387
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This:
    #text {
    width:480px
    height:auto !important;
    height:100px
    min-height:100px
    background:#ffffff
    float:left;
    margin:15px
    Code (markup):
    Should be:
    #text {
    width:480px;
    height:auto !important;
    height:100px;
    min-height:100px;
    background-color:#ffffff;
    float:left;
    margin:15px;
    }
    Code (markup):
     
    jBud, Oct 24, 2007 IP
  5. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #5
    Should be:

    #text {
    width:480px;
    min-height:100px;
    background:#fff;
    display:inline;
    float:left;
    margin:15px;
    }

    * html #text { height:100px; }
     
    soulscratch, Oct 24, 2007 IP
    J8Diamonds likes this.
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Does that always work? because someone had an article about the three height declarations for min-height/height and someone in the comments mentioned *html and then there was a reply where in some instance that didn't work. ???
     
    Stomme poes, Oct 24, 2007 IP
  7. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #7
    As far as I know, that !important is there so that browsers that do support !important (all but MSIE6 and pre) will auto adjust the height. MSIE doesn't understand the "importance" part and ignores it.. since height:100px is AFTER the declaration for height: auto then in MSIE the height is 100 pixels. But as we all know, MSIE6 treats height as min-height, and will expand to fit content regardless if you even set the height to 1px. Modern browsers pick up the min-height of 100 pixels.. and I think that's it.

    I hate using the !important trick. Just feed modern browsers the actual property which is min-height, and feed IE 100 pixels seperately, and it would be treated as min-height.
     
    soulscratch, Oct 24, 2007 IP
  8. J8Diamonds

    J8Diamonds Active Member

    Messages:
    354
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Why just #fff or #000? I'll go google it :)*

    Anyway, shifted the page to here, but am now wanting to make it so when you mouse over a certain image on the right it shows up in the big left box with the matching text.

    Should I be looking at implimenting a script or can I do this with various pseudo classes such as focus, active and hover?

    *edit
    Just short hand? I can write red as #f00 instead of #ff0000 and assuming I have a clever enough browser it knows?
     
    J8Diamonds, Oct 25, 2007 IP
  9. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #9
    You shouldn't need to worry what browsers support short hand hexadecimals.. I'm pretty damn sure browsers even before NN4 supported them.
     
    soulscratch, Oct 25, 2007 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #10
    There was a version of Mozilla Suite BEFORE firefox was a twinkle in an FLOSS fanboys eye that had problems with them... In other words in this day and age, don't worry about it.
     
    deathshadow, Oct 25, 2007 IP
  11. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Stomme poes, Oct 25, 2007 IP
    J8Diamonds likes this.