definition list doesn't look right

He has: 688 posts

Joined: Feb 2001

http://www.hampton-homes.net/links.php

You can look at the code but basically I designed these simple links using the DEFINITION LIST tags.

<?php
<dl>
  <
dt /><span class=\"standard underline\">Utilities</span>
    <dd /><a href=\"http://www.cmutilities.com/\" class=\"standard\" target=\"new\">Charlotte-Mecklenburg Utilities</a>
    <dd /><a href=\"http://www.dukepower.com/\" class=\"standard\" target=\"new\">Duke Power</a>
    <dd /><a href=\"http://www.yorkelectric.net/\" class=\"standard\" target=\"new\">York Electric Cooperative</a>
    <dd /><a href=\"http://www.piedmontng.com/\" class=\"standard\" target=\"new\">Piedmont Natural Gas</a>
    <dd /><a href=\"http://www.ycnga.com/\" class=\"standard\" target=\"new\">York County Natural Gas</a>
</dl>
?>

It looks great in IE5.5 (where I designed it) and in Netscape. But when I see it in IE6 it's all sorts of messed up. They all appear centered... but with the indents on each line too. Wierd. First of all, can anybody confirm this is a IE6 issue. The code is correct and valid so what can I do?

Confused

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

... well, um, what the heck are you closing the tags for before putting anything in them?! It's valid, but wrong?

He has: 688 posts

Joined: Feb 2001

I understand what you mean but I thought with XHTML you're supposed to put a trailing " />" after tags that don't close themselves. Like becomes . But I'm guessing from your reaction that this is not the case, in this usage?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Definition lists are like other lists --

<dl>

__<dt><span class="standard underline">Utilities</span></dt>

____<dd><a href="http://www.cmutilities.com/" class="standard" target="new">Charlotte-Mecklenburg Utilities</a></dd>

____<dd><a href="http://www.dukepower.com/" class="standard" target="new">Duke Power</a></dd>

____<dd><a href="http://www.yorkelectric.net/" class="standard" target="new">York Electric Cooperative</a></dd>

____<dd><a href="http://www.piedmontng.com/" class="standard" target="new">Piedmont Natural Gas</a></dd>

____<dd><a href="http://www.ycnga.com/" class="standard" target="new">York County Natural Gas</a></dd>

</dl>
'

No? I haven't used them in years, but it just makes sense.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.