Forum Moderators: open

Message Too Old, No Replies

         

JAB Creations

12:56 am on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cheat Code - Effect.
Cheat Code - Effect.
Cheat Code - Effect.

I've been trying to figure out what would be the best tags for this situation and I'd love to have some input from people here. Here are the tags that are available according to the W3c...
[w3.org...]

I'd prefer to be able to do this without using <br /> tags but that would probally mean figuring out how to keep "Cheat Code" and "- Effect." on the same line and THEN break.

Cheat codes are overwhelmingly entered via input through the keyboard (my site concentrates on computer games) so I figured the <kbd> tag may be a good choice and then use <dfn> tag afterwards. Anyway, lets hear some suggestions please! ;-)

encyclo

1:15 am on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a definition list more than anything else - it is about the only way to mark up the relationship between the code and effect:

<dl>
<dt>Cheat code</dt>
<dd>Effect</dd>
<dt>Cheat code</dt>
<dd>Effect</dd>
</dl>

You can or course combine the above with

<kbd></kbd>
around each Cheat code as required. You could use
<dfn></dfn>
, but it would be pretty redundant as you are already marking up the Effect as a definition description.

JAB Creations

4:27 am on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tried that but I have to figure out how <dt>Cheat code</dt> and then <dd>Effect</dd> on the same line, then break to a new line without using <br /> tags as they will not let the page validate.

Robin_reala

10:34 am on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Something like:

dt, dd { float: left; }
dt { clear: left; }

That's untested but should work.

JAB Creations

12:52 pm on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Works great, except for Internet Exploiter...

Also the first character (a space) is not being rendered by Gecko, IE, or Opera.

dd {
float: left;
margin: 0px;
}
dt {
clear: left;
float: left;
margin: 0px;
}
<dl>
<dt>it is a good day to die</dt><dd> - Invulnerability except from Mages and Death Knights.</dd>
<dt>glittering prizes</dt><dd> - WOOHOO!</dd>
</dl>

jessejump

8:01 pm on Sep 25, 2005 (gmt 0)

10+ Year Member



A table
A horizontal ul menu ....repeat .....
A left float div / div

iamlost

10:59 pm on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this hybrid:


<body style="padding: 0; margin: 0; font-size: 100%;">
<dl style="margin: 2em;">

<dt style="float: left;">Term 1</dt>
<dd style="position: relative; left: 1em;">Definition 1</dd>

<dt style="float: left;">Term 2</dt>
<dd style="position: relative; left: 1em;">Definition 2</dd>

</dl>
</body>

JAB Creations

7:11 am on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, got it! A combination of what everyone has suggested! A little coloring to bring out the formating without going overboard. :-)

<html>
<head>
<style>
dd {
background: #000;
color: #fff;
float: left;
margin: 0px 0px 0px 4px;
position: relative;
}
dt {
background: #000;
clear: left;
color: #fff;
float: left;
margin: 0px;
}
</style>
</head>
<body>

<dl>
<dt>it is a good day to die</dt><dd> - Invulnerability except from Mages and Death Knights.</dd>
<dt>glittering prizes</dt><dd> - Gives extra gold, wood, and oil.</dd>
<dt>3333333333333333</dt><dd> - 33333333333333</dd>
<dt>4444444444444444</dt><dd> - 44444444444444</dd>
</dl>

</body>
</html>

JAB Creations

7:34 am on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Gah... going to need some IE conditional comments. Any suggestions? :-\

Bernard Marx

10:58 am on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This what you're after, JAB?

dt {
clear: left;
float: left;
margin: 0px;
}

dd {
margin: 0px 0px 0px 4px;
}

JAB Creations

11:05 am on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Had to override some of the other code in my IE CC but it works! Thanks! Now it works in Gecko, IE, and Opera. :-)

Hester

8:16 am on Sep 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not just make the <dd> display:inline?

JAB Creations

11:53 am on Sep 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've had it working for a while now. The code is all there, try it for yourself and see why.:)