×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Use of external styles in xhtml

    Hi

    I am trying to use the link tag to point to an external css file in my xhtml page and using the Nokia MIT (Nokia Mobile Browser simulator) for viewing my pages and I am seeing something really interesting which I was hoping someone would be able to explain.
    When I request a page with the following xhtml markup

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title><link type="text/css" rel="stylesheet" href="default.css"/>
    </head>
    <body><form id="myForm" method="post" >
    <div>
    <span class="Style1">Form1 Should appear italicized, not bold and green
    </span>
    <br/>
    <input type="submit" name="simpleCmd" value="some button"/></div></form></body>
    </html>

    where default.css looks like

    .Style1 {color:green;font-style:italic; font-weight:normal;}
    .Style2 {color:red; font-weight:bold;}

    I do not see the style applied to the span tag, but if I switch the class name in the span tag from
    <span class="Style1"> to <span class="style1">

    then I see the style being applied. Is anybody aware why this is happening - it surely doesn't look like the right behavior.
    Note: In both cases the default.css gets requested properly.

    Thanks in advance
    Kashif

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere, Finland
    Posts
    67

    RE: Use of external styles in xhtml

    Hello,

    I tried your code with the Toolkit and NMB 3.0.1 and it indeed didn't apply the style to the span tag. It however did work with 6590 simulator (with no colors of course) and 9210i Communicator. So.. it's probably a bug (or a feature) of NMB 3.0.1. According to various CSS style guides, it's recommend to start class names with lowercase letters.

    BR,
    Mika / Forum Nokia Developer Support

Posting Permissions

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