Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-11-2010, 01:43 PM   PM User | #1
adarshakb
Regular Coder

 
adarshakb's Avatar
 
Join Date: Jun 2009
Location: Silicon valley of india
Posts: 247
Thanks: 11
Thanked 1 Time in 1 Post
adarshakb has a little shameless behaviour in the past
Why is my browser not displaying properly xml

Hi there. I am new to xml

Why is it that my browser doesn't display the style i mentioned in the css and just displays it as a plain text like this.

Code:
Joe Marini 232322 2321111232 42-232322 abcd@gmail.com
Here are my codes

The document is in the same folder and the files are test.xml and testcss.css
Code:
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" herf="testcss.css"?>
<BusinessCard>
	<name>Joe Marini</name>
	<phone type="mobile">232322</phone>
	<phone type="work">2321111232</phone>
	<phone type="fax">42-232322</phone>
	<email>abcd@gmail.com</email>
</BusinessCard>
and my css

Code:
BusinessCard {
	font-family:Arial, Helvetica, sans-serif;
	background-color:#DACFE5;
	width: 300px;
	display:block;
	padding:1px solid #0D3427;
	margin:5px;
	text-align: left;
}

Name {
	color:#0D3427;
	font-weight: bold;
	font-size:140%;
	display:block;
	margin-bottom: 3%;
}

phone {
	font-size: 90%;
	color: #523819;
	font-size:90%;
	display:block;
}
email {
	color: #0D3427;
	font-size: 90%;
	font-weight: bold;
	display:block;
	margin-bottom: 3%;
}
__________________
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

Albert Einstein
-----------------------------------------------------
My Blog songs
adarshakb is offline   Reply With Quote
Old 09-11-2010, 04:12 PM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,863
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
Code:
<?xml-stylesheet type="text/css" herf="testcss.css"?>
because the attribute is named href.

PS. you don’t have a Name element in your XML.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 09-12-2010, 07:16 AM   PM User | #3
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,887
Thanks: 5
Thanked 186 Times in 183 Posts
Arbitrator is on a distinguished road
Also worth noting that 1px solid #0D3427 is not a valid value for the padding property.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:36 AM.


Advertisement
Log in to turn off these ads.