You Are Here:

Community: Developer Discussion Boards

#1 Old Use of external styles in xhtml - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 3
fihsak
Offline
Registered User
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
Reply With Quote

#2 Old RE: Use of external styles in xhtml - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 67
Location: Tampere, Finland
mikaaho
Offline
Regular Contributor
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia