#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Location
    Budapest
    Posts
    1,703
    Rep Power
    67

    CSS P:first-letter


    Why can't I get this to work on the first letter -

    #maincontent {
    float: right;
    top: 100px;
    width:638px;
    margin-left:132px;
    height:500px;
    clear:right;
    position: absolute;
    background-repeat: no-repeat;
    border: 0px solid purple;
    text-align:left;
    padding-top:0px;
    }

    #maincontent H1{
    display:block;
    width:auto;
    border: 0px solid purple;
    text-align:center;
    margin-top:20px;
    margin-bottom:40px;
    color:#000066;
    font-size:16px;

    }

    #maincontent P{
    width:80%;
    margin-left:10%;
    margin-right:10%;
    display:block;
    background-repeat: no-repeat;
    border: 0px solid purple;
    text-align:justify;
    padding-top:0px;
    color:#08207B;
    }

    #maincontent P img{

    border: 2px solid #08207B;
    float:left;
    margin-right:5px;
    margin-bottom:0px;

    }

    #maincontent P:First-Letter{
    color:red;
    font-size:24px;
    }


    Everything else works fine...
    Today the world, tomorrow the universe...
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    i think this is yet another msie bug,
    it supposedly should support first-letter.
    and by checking things a little back and forth,
    i found out that msie only renders the first-letter correct when there is a no doctyoe defined or a doctype that triggers the quirksmode, as the doctype is more important than that first-line is working,
    you should either ignore the msie bug or make a work around.
    Last edited by Akh; January 25th, 2004 at 03:32 PM.
  4. #3
  5. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    What do you mean by not work? It doesn't color it red? Make it 24px? Or, are you looking for a drop-cap effect?
    Code:
    p:first-letter {
        color: red;
        font-size: 24px;
        float: left;
        }
    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Location
    Budapest
    Posts
    1,703
    Rep Power
    67
    It does nothing to it, in IE or NS - here is the page online -

    http://tmh.netdbs.com/turnkey/default.htm
  8. #5
  9. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    Your :first-letter is an image. Move that and it works (at least it does in Moz).

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo