PDA

View Full Version : Chunk of Code that won't cooperate (no, no, DC Eliott)


animgirl
01-20-2003, 12:23 PM
Unless you can't re-strain yourself DC... :)
Then that's okay.
But just on this one thing.
Hey,

I got this chunk of code off A List Apart.
Here's the direct link where I got the code (http://www.alistapart.com/stories/practicalcss/index.html)

HTML:
<div style= "width: 90%; background-color: #666;
border: 1px solid #333; padding: 0px; margin: 0px auto;">
<div class="spacer"></div>

<div class="row"><span class="left">
Home > Products</span>
<span class="right">
[logo]</span></div>

<div class="spacer"></div>

</div>

CSS:
div.row span.left {
float: left;
text-align: left;
font-weight: bold;
color: #fff;
width: 49%;
}

div.row span.right {
float: right;
text-align: right;
font-weight: bold;
color: #fff;
width: 49%;
}


I used it here (http://www.millenniyum.com/new)

For some reason, the code works fine in IE, but it does not work correctly in Mozilla or Netscape. The boxes aren't visible, just lines, like the box is so small because it doesn't know what content it's supposed to be enclosing.

I left the CSS section the same as the original.

Here's the HTML that I changed, though.
<DIV style="width: 95%; background-color: #3D3D49; border: 1px solid #4F6095; padding: 0px; margin: 10px auto;">
<DIV class="row">
<SPAN class="left">&nbsp; &raquo; <A class="one" href="index.html">Home</A> &nbsp; &raquo; <A class="one" href="about.html">About</A> &nbsp; &raquo; <A class="one" href="client.html">
Client</A> &nbsp; &raquo; <A class="one" href="portfolio.html">Portfolio</A> &nbsp; &raquo; <A class="one" href="contact.html">Contact</A></SPAN> <SPAN class="right"> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id="flashheader" width="275"
height="18">
<PARAM name="movie" value="flashnav2.swf">
<PARAM name="quality" value="high">
<PARAM name="bgcolor" value="#3D3D49">
<EMBED src="flashnav2.swf" quality="high" bgcolor="#3D3D49" width="275" height="18" type="application/x-shockwave-flash" pluginspage=
"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</OBJECT></SPAN>
</DIV>
Any help would be greatly appreciated :)
animgirl :)
I have no errors/warnings on this page when I run Quick Tidy!!!

IMPORTANT
I did not totally enclose the last bit of code because when I did, it made the window extremely large, EVEN WHEN I closed all tags, like 6 times!!!

DCElliott
01-20-2003, 03:59 PM
You often need to put a & n b s p ; in a spacer div for the div to be expressed.

When posting code hard wrap all lines to ~60 characters before posting it in the [ c o d e ] [/ c o d e ] tags. The forum places the code in pre or blockquote tags which allow lines to not wrap.

There, I didn't really get involved, did I??

animgirl
01-20-2003, 04:32 PM
Aaah, it worked. I mean, I knew it would, but it worked so simply!

Well, okay you can get involved, I just wanted to try to impress you or something...
:)

Don't be offended or anything, I really appreciate your help; I just wanted to show you that I am learning or something.