Xml in firefox

how come when I view my xml xslt website in firefox, the page shrinks to a smaller size within the web browser.

Hi aderon14, welcome to the forums.

When you say “shrink” you mean drastically smaller? Or maybe it’s just elements getting shuffled around as they load in?

heres a screenshot of my problem. It happens when I click the navigation links to go to a new page.

Yes, I see what you mean. It looks like it’s half width centered. I doubt if the problem is with the XML file. Can you post the XSL you’re using?

<?xml version=“1.0” ?>

<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>

<xsl:template match=“/”>
<html>
<head>
<title>Soccer Players</title>
<!–css–>
<link rel=“stylesheet” type=“text/css” href=“myStyle.css” />
<style type=“text/css”>
#sponsors {
margin: 0;
padding: 0;
display: inline;
font-style: italic;
}

		&lt;/style&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;div class="group"&gt;
			
			&lt;ul&gt;
				&lt;li&gt;&lt;a href="AnimeCharacter.xml"&gt;My favourite anime characters&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="CarList.xml"&gt;My favourite cars&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a href="SoccerPlayer.xml"&gt;My favourite soccer players&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
			
			&lt;h2&gt;Soccer Players&lt;/h2&gt;
			
			&lt;xsl:apply-templates /&gt;
			
		&lt;/div&gt;
			&lt;div class="footer"&gt;
				&lt;p&gt;This page was designed and built by Kevin Ho&lt;/p&gt;
			
			&lt;/div&gt;
		
	&lt;/body&gt;
	
&lt;/html&gt;

</xsl:template>

<xsl:template match=“player”>

				&lt;div class="content"&gt;
					&lt;img class="pic" src="{image/source}" width="{image/width}" height="{image/height}" alt="{image/alt}" /&gt;
					&lt;table&gt;
						&lt;tr&gt;
							&lt;th&gt;Name:&lt;/th&gt;
							&lt;td&gt;&lt;xsl:value-of select="name" /&gt;&lt;/td&gt;
						&lt;/tr&gt;
						&lt;tr&gt;
							&lt;th&gt;Team:&lt;/th&gt;
							&lt;td&gt;&lt;xsl:value-of select="team" /&gt;&lt;/td&gt;
						&lt;/tr&gt;
						&lt;tr&gt;
							&lt;th&gt;Position:&lt;/th&gt;
							&lt;td&gt;&lt;xsl:value-of select="position" /&gt;&lt;/td&gt;
						&lt;/tr&gt;
						&lt;tr&gt;
							&lt;th&gt;Height(cm):&lt;/th&gt;
							&lt;td&gt;&lt;xsl:value-of select="player_height" /&gt;&lt;/td&gt;
						&lt;/tr&gt;
						
						
							&lt;span&gt;This player is being sponsored by:&lt;/span&gt;
							&lt;xsl:apply-templates select="sponsor" /&gt;
						
					&lt;/table&gt;
				&lt;/div&gt;

</xsl:template>

<xsl:template match=“sponsor”>

		&lt;p id="sponsors"&gt;
			
			&lt;xsl:value-of select="." /&gt;
		&lt;/p&gt;

</xsl:template>

</xsl:stylesheet>

I made a test XML file that hopefully has a schema close to what you’re using

<?xml version="1.0" ?> 
<?xml-stylesheet type="text/xsl" href="aderon14.xsl" ?>
<players>
<player>
	<image>
		<source>/abe/</source>
		<width>100</width>
		<height>150</height>
		<alt>Amazing Abe</alt>
	</image>
	<name>Abraham Cruz</name>
	<team>Prophets</team>
	<position>Lead</position>
	<player_height>Tall</player_height>
	<sponsor>ABC</sponsor>
</player>
<player>
	<image>
		<source>/joe/</source>
		<width>200</width>
		<height>175</height>
		<alt>Jockey Joe</alt>
	</image>
	<name>Joseph Frump</name>
	<team>Travellers</team>
	<position>Flank</position>
	<player_height>Average</player_height>
	<sponsor>STP</sponsor>
</player>
</players>

and Firefox didn’t do the half width thing.

If you temporarily comment out the myStyle.css line, does it fix things as far as the half width problem?

.....
				<title>Soccer Players</title>
				<!--css-->
				<!--
				<link rel="stylesheet" type="text/css" href="myStyle.css" />
				-->
.....

yes i commented out the css link, but firefox still does that half width problem.

I would have bet it was something in the CSS file. Anyway, I looked at the XSL again and still can’t see anything there that might be responsible. Can you host the files somewhere that I can test them online or compress them into a zip so I can test locally?

here I have just attached the files in a zip.