Misplaced Pages

Template talk:Float begin: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 22:04, 21 March 2005 editOmegatron (talk | contribs)Administrators35,798 editsNo edit summary← Previous edit Latest revision as of 04:27, 4 April 2020 edit undoOmegatron (talk | contribs)Administrators35,798 edits move to documentationTag: 2017 wikitext editor 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Used for putting a table in a frame. Possibly renamed, updated, etc. in the future. Used for putting a table in an image frame. Possibly renamed, updated, or in the future.


Still needs some work on the caption length screwing things up. Should maybe be renamed table_float_end or something, since it is only for pipe tables. Still needs some work on the caption length screwing things up. Should maybe be renamed table_float_end or something, since it is only for pipe tables.


] ] ] ]


To be superseded by a ] someday? :-) To be superseded by a ] with tags like <code><nowiki>]</nowiki></code> someday? :-)


See also ]
==Usage==


== Change syntax ==
<pre><nowiki>

{{float_begin|side=left}}
I love this template; it's semantically much better than what I came up with at ].

I suggest removing the second line, that opens a table. That way we could use this template to put a frame around ''anything''. For example, at ], I have a template that already makes a complete table. I want a frame with caption around it. ] | ] 01:51, 26 Mar 2005 (UTC)

:Yeah, but since the framed css adds a gray border around any image inside of two divs, I had to take the table out of the second div and put the border around the table itself. So the table header needs a <code>border: 1px solid #CCCCCC; margin: 0.3em;</code>, and I figured I'd just include it in the template. Otherwise it would look like this:

<!-- Several images in one box -->
<div class="thumb tleft">
<div>
{| border="0" cellpadding="10" cellspacing="0" style="font-size: 85%; border: 1px solid #CCCCCC;"
|- align = "center" |- align = "center"
| ] || PNP || ] || P-channel | ] || PNP || ] || P-channel
|- align = "center" |- align = "center"
| ] || NPN || ] || N-channel | ] || NPN || ] || N-channel
|- align = "center" |- align = "center"
| BJT || || JFET || | BJT || || JFET ||
|}
{{float_end|caption=Different types of transistors}}
<div class="thumbcaption"> Transistor symbols of different types</div>
</nowiki></pre>
</div>
</div>

<br clear="all"/>

:If you can figure out a way to get the same look but make the table independent, go for it. I am not a css guru. - ] 02:05, Mar 26, 2005 (UTC)

::Good point. I had forgotten that I put the border in ] itself. Let me think about it. ] | ] 02:31, 26 Mar 2005 (UTC)

::Alright, how does ] look on your browser? In Firefox, it is not quite perfect, but it's 99%. The borders are all generated by ] and ]; the chess board is just a plain table without border. ] | ] 04:34, 26 Mar 2005 (UTC)


==Testing==
becomes


<!-- Several images in one box -->
{{float_begin|side=left}}
<div class="thumb tleft">
<div>
{| border="0" cellpadding="10" cellspacing="0" style="font-size: 85%; border: 1px solid #CCCCCC;"
|- align = "center" |- align = "center"
| ] || PNP || ] || P-channel | ] || PNP || ] || P-channel
|- align = "center" |- align = "center"
| ] || NPN || ] || N-channel | ] || NPN || ] || N-channel
|- align = "center" |- align = "center"
| BJT || || JFET || | BJT || || JFET ||
|}
{{float_end|caption=Different types of transistors}}
<div class="thumbcaption"> Transistor symbols of different types</div>
</div>
</div>

Latest revision as of 04:27, 4 April 2020

Used for putting a table in an image frame. Possibly renamed, updated, or obsoleted by fixing the site's css (Bug 1729) in the future.

Still needs some work on the caption length screwing things up. Should maybe be renamed table_float_end or something, since it is only for pipe tables.

Template:Float begin Template:Float end

To be superseded by a table namespace with tags like ] someday?  :-)

See also Misplaced Pages talk:Extended image syntax#Multiple images in one frame

Change syntax

I love this template; it's semantically much better than what I came up with at Template:Caption top.

I suggest removing the second line, that opens a table. That way we could use this template to put a frame around anything. For example, at Fork (chess), I have a template that already makes a complete table. I want a frame with caption around it. dbenbenn | talk 01:51, 26 Mar 2005 (UTC)

Yeah, but since the framed css adds a gray border around any image inside of two divs, I had to take the table out of the second div and put the border around the table itself. So the table header needs a border: 1px solid #CCCCCC; margin: 0.3em;, and I figured I'd just include it in the template. Otherwise it would look like this:
PNP P-channel
NPN N-channel
BJT JFET
Transistor symbols of different types


If you can figure out a way to get the same look but make the table independent, go for it. I am not a css guru. - Omegatron 02:05, Mar 26, 2005 (UTC)
Good point. I had forgotten that I put the border in Template:Chess position itself. Let me think about it. dbenbenn | talk 02:31, 26 Mar 2005 (UTC)
Alright, how does Fork (chess) look on your browser? In Firefox, it is not quite perfect, but it's 99%. The borders are all generated by Template:Caption top and Template:Caption bot; the chess board is just a plain table without border. dbenbenn | talk 04:34, 26 Mar 2005 (UTC)

Testing

PNP P-channel
NPN N-channel
BJT JFET
Transistor symbols of different types