Jump to content

XSLT and XML integration - display problems


sonictk

Recommended Posts

Basically, I'm building a new website, a collaboration project with my friend.Because I am using a free host which disallows all forms of server languages, including PHP, MySQL etc., I am planning to use XML files to update the site content. This way I can set up a blogger service to output an XML file, and use that XML to update the site.So far, I have created the site layout in Illustrator, sliced it in Photoshop, and created the basic HTML tables to hold the layout together. I saved this as a index.html, which will serve as a backup in case I screw up my XML and XSLT files. (Which I did)The site layout should look something like this:screenie3pq.th.jpgThe basic structure that I had planned would be something like:- news.xml //This file contains all the information, and this is basically the page I update when I want to add content to the site.- index.xsl //This would be the XSL stylesheet that calls for certain elements from the news.xmlSo, I CTRL-C and CTRL-V the code from the HTML file to index.xsl, add the usual declarations at the top of the page and bottom, and this is what happens.screenie28jz.th.jpgI'm perplexed. As you can see, the images are out of position, but I don't know why. Also, none of the content in news.xml is being outputted at all.Here is the source code of my news.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="index.xsl"?><news>	<entry>  <title>Lorem Ipsum Filler Text TEST POST1</title>  <post>  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor ###### soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. POST 1.  </post>  <author>SonicTK</author>  <date>Feb 15, 2005 10:03 PM</date>	</entry>	<entry>  <title>Lorem Ipsum Filler Text TEST POST2</title>  <post>  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor ###### soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.  </post>  <author>SonicTK</author>  <date>Feb 15, 2005 10:03 PM</date>	</entry>	<entry>  <title>Lorem Ipsum Filler Text TEST POST3</title>  <post>  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor ###### soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.  </post>  <author>SonicTK</author>  <date>Feb 15, 2005 10:03 PM</date>	</entry></news>

For more reference, here is the way my tables are set up in Dreamweaver.screenie38uo.th.jpgAnd finally, here is the entire directory of my site:http://twinsnakes.sitesled.com/TheTwinSnakes.zipCould anyone please have a look at my code and tell me what I'm doing wrong?

Link to comment
Share on other sites

You forgot to post the code for the XSLT. After all, that's what caused the problem. Nevermind. It was in the zip anyway :) .This works, I tested it. The changes are in the XPath expressions selecting the news themselves:

<xsl:for-each select="/news/entry"><table width="700" border="0" cellspacing="0" cellpadding="0">	<tr>  <td>  	<!-- Reading from news.xml //-->  	<div class="white12pxTahoma" align="left"><strong><xsl:value-of select="title" /></strong></div><br />  	<div class="grey10pxVerdana" align="left"><xsl:value-of select="post" /></div><br />  	<div class="grey8pxVerdana" align="right"><xsl:value-of select="author" /> ranted on <xsl:value-of select="/news/entry/date" /></div>  	<br />  </td>	</tr></table></xsl:for-each>

By the way... table designs s.u.c.k. . When you have some time to spare on redesign, try getting rid of the tables and replace them with CSS float, positions, demensions, etc.

Link to comment
Share on other sites

...That was it? I feel like such a nub D:But what about the pictures not matching up correctly problem? And:

When you have some time to spare on redesign, try getting rid of the tables and replace them with CSS float, positions, demensions, etc.
I thought the float: property of CSS didn't go very well with different resolutions?
Link to comment
Share on other sites

The float property is exactly what comes great uder different resolutions scince it's putting the stuff on the top left/right corner of the container of the element :) .As for the picture problem... I'll look for it now, but I you should check if the code in the html and xsl is exactly the same. Any difference might be the cause for this.[edit=1]Hint: I also saw that only FF makes this problem. It all works fine in IE. Strange...[/edit][edit=2]Another hint: it only makes it with the XML file. When I preview the XSLT, there's no problem in both IE and FF.[/edit][edit=3]Could it be the tabular design itself?[/edit]

Link to comment
Share on other sites

The float property is exactly what comes great uder different resolutions scince it's putting the stuff on the top left/right corner of the container of the element
Hmm. I'll try using CSS with the other site that I'm going to work on, then.And:1. Exactly. It's pissing me off to no end, because I'm a strong adovate of FF anyway, and I hate IE. :)2. I'm wondering about this myself, because I removed the XML declaration tags and it looked fine, but when I use it with the XML it screws up. For example, whenever I declare a new table, there is a blank line that I didn't declare, it comes out of nowhere. (Look at the space between the header and the navbar; there shouldn't be any space at all.)3. I doubt it. You can see the table layout picture there: I don't see any hitches with it. But I'm most likely wrong. =\EDIT: Just to be sure, I updated the tables again, still the same problem.This table design:screenie2cs.th.jpgStill gives me this:screenie29uj.th.jpgWell, at least the XML news kinda works now.
Link to comment
Share on other sites

The only way around this which I can think about this is the following:1. Make an image of the whole header at one.2. Make a single table cell for it.3. Size that cell so it fits the full image.4. Place the image as a "background-image: url(background_or_whatever.jpg)".5. Place a div, span or whatever inside the table cell and write the "contact us" link there.6. Give the div,span or whatever a "float: right".

Link to comment
Share on other sites

I think I saw the most certain reason of the thing here... the html doesn't have a DOCTYPE on it. The XSLT is turning the XML into XHTML. There are probably some differences in how things render in quirks mode and in XHTML transitional mode.[edit] No problem. I'm not much of a professional either. I started learning all the stuff last summer :) [/edit]

Link to comment
Share on other sites

Oh no... not this problem again. Everyone is staring to have it... hm... try to put this right after the <xsl:stylesheet>:

<xsl:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" method="html" />

I have no idea if it will work. The last few days this same problem has been bothering me as well.[edit] Another idea... try asking your host to register the XML and XSL mime types if he hasn't already done so.[/edit]

Link to comment
Share on other sites

Well, it didn't. =\ Thanks, though. Anyone else know about this problem?EDIT:

XSLT differencesMozilla supports XSL Transformations (XSLT) 1.0. It also allows JavaScript to perform XSLT transformations and allows running XPATH on a document.Mozilla requires that you send the XML and XSLT file holding the stylesheet with an XML mimetype (text/xml or application/xml). This is the most common reason why XSLT won't run in Mozilla but will in Internet Explorer. Mozilla is strict in that way.Internet Explorer 5.0 and 5.5 supported XSLT's working draft, which is substantially different than the final 1.0 recommendation. The easiest way to distinguish what version an XSLT file was written against is to look at the namespace. The namespace for the 1.0 recommendation is http://www.w3.org/1999/XSL/Transform, while the working draft's namespace is http://www.w3.org/TR/WD-xsl. Internet Explorer 6 supports the working draft for backwards compatibility, but Mozilla does not support the working draft, only the final recommendation.
http://developer.mozilla.org/en/docs/index...w_to_handle_XMLUh, how do I do that?EDIT: Another thing: would it be possible to specify only a certain part of my page to load the news.xml, without using JScript or anything like that? This might solve the "pictures out of place" problem as well.I'm really pissed that everything works in IE, but not in FF though.EDIT#2: I don't think it's a tabular problem though, because everything displays fine in IE. This totally doesn't make any sense.
Link to comment
Share on other sites

Well, it didn't. =\ Thanks, though. Anyone else know about this problem?EDIT:http://developer.mozilla.org/en/docs/index...w_to_handle_XMLUh, how do I do that?EDIT: Another thing: would it be possible to specify only a certain part of my page to load the news.xml, without using JScript or anything like that? This might solve the "pictures out of place" problem as well.I'm really pissed that everything works in IE, but not in FF though.EDIT#2: I don't think it's a tabular problem though, because everything displays fine in IE. This totally doesn't make any sense.

Its ur server host. Read the Topic I started. Its the host not your code.
Link to comment
Share on other sites

Roger. My host still hasn't replied to my queries about that, so is there any workaround this problem?And what about the display problems? I can't understand why everything seems fine in IE but not in FF.

Have you built your site to w3c standards?
Link to comment
Share on other sites

When writing XSLTs, the DOCTYPE is declared at the <xsl:output> element. As you can see, I have suggested transitional. The reason for this is that you use tables for layout. Also, If you have accidently added some deprecated HTML tag, this would make your stylesheet invalid.For your next project, use strict. For this one, it may be best not to risk with strict.

Link to comment
Share on other sites

I'm not sure I understand what you want. What XSLT does is to transform the XML into XHTML. It's considered a stylesheet of the XML which is the reason you open the XML file to see the site itself. If you want the user to see the XHTML code instead, you must execute the XSLT and XML with a server side script, which will make the transformations and return the XHTML code to the client. This is especially usefull for XSLT unaware browsers. The XSLT tutorial explains how to execute the code with ASP(see XSLT on the server), but I'm still searching for a way to execute it with PHP. I think that if you ask Skemcin, he would be able to tell you a code for ColdFusion :) .There is also another way- make XHTMLs and use the JavaScript code here. This executes the code inside the XHTML and it's practically a way to bind XSLT with XHTML. However, it doesn't have the advantages of server side executed XSLT.

Link to comment
Share on other sites

I don't want to have to use JScript. =\ It's kinda unpopular.Erm, I kinda meant like is there any other way at all to load information via external files w/o using a server-side language? The main reason I thought of XML/XSLT integration in the first place was because it loaded information from .xml files, it would be easy to update, and it did not make use of any SSL.

Link to comment
Share on other sites

Well, you thought right. XSLT could be used without server side scripting. Is JavaScript a server side script? No, it's not :) . Unpolular?!?! What browser you use? IE1 :) ?There is a third way, but it's not a "valid" way. I think you could call for the XSLT namespace inside the XHTML document and therefore transform the XML inside the XHTML itself. I haven't tryed this, and even if I did- it's not a standart compilant way and because of that, I don't plan to use it and I don't advice you to use it either.By the way, I just thought of an idea... what if you rename the XML files to HTML? They won't be "valid" but if they are called index.html and are inside certain folders, this would hide them, so it won't matter to the end user.

Link to comment
Share on other sites

This "weird" loop seems to keep going and going and ... well you know.OK this is what little knowledge I can reveal.Download Firefox, get the developer extension,devbar2ni.gifYou can now use the "Information" button to view "Response Headers".The problem with your page sonictk AFAICT is that the server is sending the .xsl as text/plain ( as Kovo has already pointed out ).If your host is using Apache you don't have to wait for them to make a change, you can do this with a .htaccess file that would look like:.htaccess file

AddType application/xhtml+xml .xmlAddType text/xml .xslAddType text/xml .css

That is the .htaccess file I use here:CD List XMLYou can try creating a test dir upload the .htaccess file see if it fixes your headers.( Your pages and style sheets have to be served from this directory )But even an expert like Stu Nicholls has experienced this ( post ):

However, no matter what I do, Internet Explorer will not recognise application/xhtml+xml and if served up as this MIME type it will just display the source code.
One thing I experimented with was making my xslt stylesheets with a .css extension.My link above displays fine in IE6 and FF ( using a css ext ).( Not recommending that, just saying it is so. )boen_robot, you got my back in case I messed anything up here....-hs
Link to comment
Share on other sites

.htaccess files are also not allowed on my host.OH SNA-:)

By the way, I just thought of an idea... what if you rename the XML files to HTML? They won't be "valid" but if they are called index.html and are inside certain folders, this would hide them, so it won't matter to the end user.
All I need to do is just rename them? Do I need to update the links in the XML files or anything?BTW JScript is frowned upon by a lot of people anyway, apparently.Uhh my news.xml file has this little line of code in it that goes:
<?xml-stylesheet type="text/xsl" href="index.xml"?>

Should that be changed?UPDATE: Omfg, it works! I just changed the .xsl extension to .xml and updated the link in the news.xml file and it friggin' works, albeit still with the 'pictures not displaying correctly' problem. Now I have to figure out how to fix that.Thanks guys. :)UPDATE #2: Uhh, another thing: Why isn't my bold and italic text working? And I can't use <BR /> either in the news.xml file, it doesn't show up for some reason.

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="index.xml"?><news>	<entry>  <title>Dawn Breaks...</title>  <post>  Welcome, welcome. I am aware, of course, of the sheer magnitude of the task I have before me before this site could perhaps be called <i>completed</i>, in a sense, and with that being said, <b>cut me some goddamn slack.</b> This is my first time using XML and XSLT, and server issues and coding issues aside, the mere setbacks that I have experienced so far are more than enough to crush any human soul.     Thus my quest continues.  </post>  <author>SonicTK</author>  <date>Feb 25, 2005 11:41 AM </date>	</entry></news>

Link to comment
Share on other sites

UPDATE:Ok, I've re-designed the entire layout using CSS. You can find the layout code in the <head> section of index.xml. While this seems to have fixed some problems, I now have two more problems: One:screenie8re.th.jpgAs you can see, the Contact Us picture is out of position, even though it appears fine in the HTML version. Only when I convert it to CSS does this happen.Two:As you can see from the screenshot, the entire site is not aligned to the center of the page any more. I have no idea what CSS property I can use to align it to the center. I tried putting:<div class="header" align="center"> in the div tags, but it didn't work, it acted as if nothing had been included.So uh, I just need to finish these two little hitches, and everything should be fine....One more thing: how do I get CSS to not recognize whitespace? Because when I type code in one continuous loooooong line (e.g. image after image after image) it works fine, but it's extremely messy. If I try to put them like this, however:

<div class="navigation">     <img />     <img />     <img /></div>

For some reason spaces will appear between the pictures. Instead, to get it to work, I have to type it like this:

<div class="navigation"><img /><img /><img /><img /> ........ </div>

So...yeah, could someone please help me out here?Here is the updated directory of my entire site:http://twinsnakes.sitesled.com/TheTwinSnakes.zip

Link to comment
Share on other sites

Theese two issues solved.I see many others, but I edited only the most critical of them and few simple ones, because I'm bored :) .The solution for the "contact us" button was to remove one of the divs. It was the first thing to come to my mind and it worked :) . By the way, remove the "contact us" from the background image. Otherwise, if you add something, you would also have to change the background. There's no point of it.To center a text you type "text-align: center". To center the element itself you do "margin: 0 auto;". I used them both and it worked because of the text-align. You may edit/remove the margin, but I suggest to leave it just in case you make some additions to the layout.Here's a tip(W3C QA tip): use appropriate class names. Name things according to their purpose. Next time, don't use things like white10pxVerdana. What if you would like to change that font everywhere it's used? You go manually? What for? If you have appropriate name, you can just edit it in the CSS file once and that's it.Anyway...index.xml

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/><xsl:template match="/"><!-- // The Twin Snakes Comic is Copyirght Siew Yi Liang and Chew Zhao Ying 2006. All Rights Reserved. // Site design and layout 'Mono' created by SonicTK of Intelligent Productions. // By viewing this website, you agree not to hold the authors and their affiliates responsible for any content that you may find deragatory// or otherwise offensive. // --><!-- Begin index.html //--><html><head><title>The Twin Snakes - We Make Life Just That More Miserable To Endure.</title><!-- Retrieve styles.css from root directory //--><link href="monostyles.css" rel="stylesheet" type="text/css" /></head><body><div class="content"><!-- Header //--><div class="header">		<img class="contactus" src="images/Mono_MAIN_02.jpg" alt="Contact us" /></div><!-- Navigation //--><div class="navigation">	<img src="images/Mono_MAIN_06.jpg" style="width:8px;" alt="" />	<img src="images/Mono_MAIN_07.jpg" style="width:31px;" alt="" />	<img src="images/Mono_MAIN_08.jpg" style="width:39px;" alt="" />	<img src="images/Mono_MAIN_09.jpg" style="width:40px;" alt="" />	<img src="images/Mono_MAIN_10.jpg" style="width:37px;" alt="" />	<img src="images/Mono_MAIN_11.jpg" style="width:57px;" alt="" />	<img src="images/Mono_MAIN_12.jpg" style="width:44px;" alt="" />	<img src="images/Mono_MAIN_13.jpg" style="width:65px;" alt="" />	<img src="images/Mono_MAIN_14.jpg" style="width:39px;" alt="" />	<img src="images/Mono_MAIN_15.jpg" style="width:48px;" alt="" />	<img src="images/Mono_MAIN_16.jpg" style="width:292px;" alt="" /></div><!-- Spacer //--><div class="spacer" /><!-- End CSS Layout //--><br /><!-- Content Table. All XML and XSLT functions should be defined to suit this area. //--><xsl:for-each select="news/entry"><table width="700" border="0" cellspacing="0" cellpadding="0" class="grey1pxborder">	<tr>		<td>			<!-- Reading from news.xml //-->			<br />			<div class="white12pxTahoma" align="left"><strong><xsl:value-of select="title" /></strong></div><br />			<div class="grey10pxVerdana" align="left"><xsl:value-of select="post" /></div><br />			<div class="grey8pxVerdana" align="right"><xsl:value-of select="author" /> ranted on <xsl:value-of select="date" /></div>			<br />		</td>	</tr></table><br /></xsl:for-each></div><br /><br /><!-- Copyright Information //--><div id="copyright" class="grey8pxTahoma">The Twin Snakes Comic is Copyirght Siew Yi Liang and Chew Zhao Ying 2006. All Rights Reserved.<BR />By viewing this website, you agree not to hold the authors and their affiliates responsible for any content that you may find deragatory or otherwise offensive. </div></body></html></xsl:template></xsl:stylesheet>

monostyle.css too got some adjustments. I moved the layout here, scince CSS files are actually build for that.

/* Main Styles Definition CSS Document for Theme 'Mono' By SonicTK of Intelligent Productions 2006.ALL SITE STYLES SHOULD GO IN HERE UNLESS SPECIFIED OTHERWISE. NO <FONT> TAGS SHOULD BE USED, <DIV> IS TO BE USED AS FAR AS POSSIBLE.Proper way of defining styles: <color><size><type>If style is not of a general category, please place a comment tag and add a space at the end of this CSS document under Misc. Styles.Please define styles in the area that they should go in. KEEP IT NEAT.*/		a:link {		color:#3333FF;		text-decoration:underline;	}	a:visited {		text-decoration:underline;		color:#3366FF;	}	a:hover {		text-decoration:overline;		color:#FFFFFF;	}	a:active {		text-decoration:none;		color:#3333FF;	}	.white12pxVerdana {		font-family:Verdana;		font-size:12px;		color:#FFFFFF;	}	.white10pxVerdana {		font-family:Verdana;		font-size:10px;		color:#FFFFFF;	}	.white8pxVerdana {		font-family:Verdana;		font-size:8px;		color:#FFFFFF;	}	.grey12pxVerdana {		font-family:Verdana;		font-size:12px;		color:#CCCCCC;	}	.grey10pxVerdana {		font-family:Verdana;		font-size:10px;		color:#CCCCCC;	}	.grey8pxVerdana {		font-family:Verdana;		font-size:8px;		color:#CCCCCC;	}	.white12pxTahoma {		font-family: Tahoma;		font-size: 12px;		color:#FFFFFF;	}	.white10pxTahoma {		font-family:Tahoma;		font-size:10px;		color:#FFFFFF;	}	.white8pxTahoma {		font-family:Tahoma;		font-size:8px;		color:#FFFFFF;	}	.grey12pxTahoma {		font-family: Tahoma;		font-size: 12px;		color:#CCCCCC;	}	.grey10pxTahoma {		font-family: Tahoma;		font-size: 10px;		color:#CCCCCC;	}	.grey8pxTahoma {		font-family:Tahoma;		font-size:8px;		color:#CCCCCC;	}	.white1pxborder {		border-width:1px;		border-color:#FFFFFF;		border-style:solid;	}	.white2pxborder {		border-width:2px;		border-color:#FFFFFF;		border-style:solid;	}	.grey1pxborder {		border-width:1px;		border-color:#999999;		border-style:solid;	}	.grey2pxborder {		border-width:2px;		border-color:#999999;		border-style:solid;	}/* ---------------------- Other styles ---------------------- <!-- Begin Site CSS layout version 1.01 //-->*/body {	margin: 0 auto;	text-align: center;	background-color: #000000;}div.header {	width:700px;	height:252px;	margin:0px;	border:none;	background-image:url(images/Mono_MAIN_01.jpg);}.contactus {	width:60px;	height:9px;	margin:0px;	border:none;	float:right;}div.navigation {	width:700px;	height:20px;	margin:0px;	border:0px;}div.spacer {	width:700px;	height:2px;	margin:0px;	border:0px;	background-image:url(images/Mono_MAIN_17.jpg);}img {	border: 0 #000000 solid;}div.navigation img {	height: 20px;}#copyright, #content {	margin: 0 auto;	text-align: center;}

Link to comment
Share on other sites

By the way, remove the "contact us" from the background image. Otherwise, if you add something, you would also have to change the background. There's no point of it.
Huh? What do you mean by, 'if I add something'? You mean, like, adding another link in the header? :confused:
use appropriate class names. Name things according to their purpose. Next time, don't use things like white10pxVerdana.
I just declare them in the CSS file because I decide what fonts and what sizes and colours I should use beforehand. This helps me keep everything organized and neat.BTW, thanks for helping me put those layout styles in the CSS document. I didn't know how to comment properly in CSS, so when I did that earlier on, the styles weren't recognized. :)" Just a question: if I place those styles in the CSS document, will my page load up all fugly first, then after it loads the monostyles.css document, then the page will look fine? Or will it definitely load the css document first before loading the rest of the page?One last thing: Why is it that when i use <b> and <i> tags, they don't seem to be recognized at all?
Link to comment
Share on other sites

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...