HTML
From Vandelay Wiki
Artvandelay (Talk | contribs) |
Artvandelay (Talk | contribs) |
||
| Line 8: | Line 8: | ||
| − | + | ====Open a link in a new browser window.==== | |
| − | + | <pre> | |
Use this for a normal widow: | Use this for a normal widow: | ||
<a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', ''); return false;"> | <a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', ''); return false;"> | ||
| Line 43: | Line 43: | ||
* Mozilla - http://developer.mozilla.org/en/docs/Midas<br /> | * Mozilla - http://developer.mozilla.org/en/docs/Midas<br /> | ||
* Explorer - http://msdn.microsoft.com/en-us/library/ms533049%28VS.85%29.aspx | * Explorer - http://msdn.microsoft.com/en-us/library/ms533049%28VS.85%29.aspx | ||
| + | <br /> | ||
| + | ====Align left and right on a single line==== | ||
| + | The following is a crude example of what can be done. But it obviously won't | ||
| + | work right at narrow viewport widths, because the bits of text overlap. You | ||
| + | need to work out what you want to happen under various circumstances, because | ||
| + | that will tell you which of many options to use.<br /> | ||
| + | |||
| + | HTML:<br /> | ||
| + | |||
| + | <pre> | ||
| + | <div class="line"> | ||
| + | <span class="left">Left hand text</span><span class="centre"> Centre text | ||
| + | </span><span class="right">Right hand text </span> | ||
| + | </div> | ||
| + | </pre> | ||
| + | |||
| + | CSS:<br /> | ||
| + | |||
| + | <pre> | ||
| + | span.left { | ||
| + | position: absolute; | ||
| + | left: 0; | ||
| + | } | ||
| + | span.right { | ||
| + | position: absolute; | ||
| + | right: 0; | ||
| + | } | ||
| + | div.line { | ||
| + | position: relative; | ||
| + | text-align: center; | ||
| + | width: 100%; | ||
| + | } | ||
| + | </pre> | ||
| + | |||
---- | ---- | ||
Back to [[Main_Page|Main Page]]<br /> | Back to [[Main_Page|Main Page]]<br /> | ||