SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: CSS Problems

Hybrid View

  1. #1
    SitePoint Zealot Wilmot's Avatar
    Join Date
    Feb 2000
    Location
    Brisbane, Queensland, Australia
    Posts
    187
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could someone please tell me what I am doing with this code? All the formatting displays correctly in IE but it is all standard text with none of the formatting applied. (center, indent, fonts)

    <html>
    <head>
    <title>Untitled</title>
    <style>
    div.head {text-align:center; font: bold 16pt, times, arial}
    div.list {font:normal 12pt; text-indent:15}
    </style>
    </head>
    <body>
    <div class=head>Heading:</div><br>
    <div class=list>Link 1</div>
    <div class=list>Link 2</div>
    <div class=list>Link 3</div>
    <div class=list>Link 4</div>
    </body>
    </html>

    Any help would be great.. Thanks.

  2. #2
    jbm
    SitePoint Community Guest
    I tried it, it works. Do this:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    &lt;style&gt;
    div.head {text-align:center; font-weight:bold; font-size:16pt; font-face:times, arial}
    div.list {font-style:normal; font-size:12pt; text-indent:15}
    &lt;/style&gt;
    [/code]

    Its basically the same thing as you have, but I prefer to write it this way. I hope this answered your question.

    jbm

  3. #3
    SitePoint Zealot Wilmot's Avatar
    Join Date
    Feb 2000
    Location
    Brisbane, Queensland, Australia
    Posts
    187
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. That seems to have worked in both browsers.

    Don't you just wish they would both follow the same standards. It would make our lives a lot easier.

  4. #4
    jbm
    SitePoint Community Guest
    I think every webmaster says that, but thats like wishing on a star. Maybe someday it will happen, for now we just try to write a piece of code that will (hopefully) work in all browsers. For further reference on cross-browser compatibility try this:
    http://www.westciv.com/style_master/...Xproperty.html

    jbm


  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I don't believe you can use shorthand for Font declarations in CSS while you can in JSS which is why IE would have problems with the first example but not the second example.

    ------------------
    Wayne Luke

    The Majormud Encyclopedia - www.bloodquest2.com
    Come Play one of the hottest games on the net.




Bookmarks

Posting Permissions

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