Jump to content

small problem..help me!!


asdqwer

Recommended Posts

Hi everybody,I have a small problem with my simple css code..when i open the xml file all the information (that I arrange it and color it in the css file) appears without any special order..all the information written in one line and i don't know why is that??? :) It does'nt appear like this example:http://www.w3schools.com/xml/cd_catalog_with_css.xml :) :(This is css code:

Personal_Information{background-color: #fff4f8;width: 100%;}title{color: #FF0000;font-size: 30pt;}student{color: #0000FF;font-size: 20pt;}name, college{color: #0000FF;font-size: 20pt;}first_name, middle_name, last_name{color: #0000FF;font-size: 15pt;}Major,ID {color: #0000FF;font-size: 15pt;}

AND this is xml code:

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/css" href="HomeWork1.css"?><Personal_Information>	<title>Welcome To My First Web Page</title>	<student>  <name>  	<first_name>Adam</first_name>  	<middle_name>Joe</middle_name>  	<last_name>Marfin</last_name>  </name>  <ID>0301116</ID>  <college>Science</college>  <Major>Computer Science</Major>	</student></Personal_Information>

Please help me AS soon AS possible.. :blink: Thanks :D:)

Link to comment
Share on other sites

If you read the css of the example you mentioned carefully, you'll notice they use the line "display: block;" to achieve this.Add this to your "first_name, middle_name, last_name", for instance, and these elements will appear each on their own line.Good luck!

Link to comment
Share on other sites

Yeah, dude... You need to add an additional property "display". I hope you understood the previous post, but if not, write "display:block" after the other properties. It simply makes the elements that use that css class in their own line. I wish you good luck too... :)

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...