<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cave &#187; XHTML/CSS</title> <atom:link href="https://bogdan.org.ua/categories/programming/xhtmlcss/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>Screem HTML editor dies with &#8216;GSlice: assertion failed: sinfo-&gt;n_allocated &gt; 0&#8242;</title><link>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html</link> <comments>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html#comments</comments> <pubDate>Thu, 20 Aug 2009 11:51:20 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[XHTML/CSS]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[screem]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=847</guid> <description><![CDATA[Screem HTML/XML editor has tag-specific auto-complete, and is a nice editor for web-developers (at least as long as Quanta is not available for Debian testing). However, version 0.16.1 is very unstable, and dies with ***MEMORY-ERROR***: screem[5527]: GSlice: assertion failed: sinfo->n_allocated > 0 As a workaround (initially suggested for the highly similar Firestarter crashes), try running [&#8230;]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.screem.org/">Screem HTML/XML editor</a> has tag-specific auto-complete, and is a nice editor for web-developers (at least as long as Quanta is not available for Debian testing).</p><p>However, version 0.16.1 is very unstable, and dies with</p><blockquote><p>***MEMORY-ERROR***: screem[5527]: GSlice: assertion failed: sinfo->n_allocated > 0</p></blockquote><p>As a workaround (initially suggested for the highly similar Firestarter crashes), try running screem with this command:</p><blockquote><p>G_SLICE=always-malloc screem</p></blockquote><p>Too bad last development version of Screem is dated March 2006.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&amp;linkname=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F08%2F20%2Fscreem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html&#038;title=Screem%20HTML%20editor%20dies%20with%20%E2%80%98GSlice%3A%20assertion%20failed%3A%20sinfo-%3En_allocated%20%3E%200%E2%80%B2" data-a2a-url="https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html" data-a2a-title="Screem HTML editor dies with ‘GSlice: assertion failed: sinfo-&gt;n_allocated &gt; 0′"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/08/20/screem-html-editor-dies-with-gslice-assertion-failed-sinfo-n_allocated.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Drupal theme development: where to start</title><link>https://bogdan.org.ua/2008/06/08/drupal-theme-development-where-to-start.html</link> <comments>https://bogdan.org.ua/2008/06/08/drupal-theme-development-where-to-start.html#comments</comments> <pubDate>Sat, 07 Jun 2008 23:03:49 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[XHTML/CSS]]></category> <category><![CDATA[development]]></category> <category><![CDATA[drupal]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[start]]></category> <category><![CDATA[theme]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=303</guid> <description><![CDATA[Simplest way to develop your custom Drupal theme is to start with some skeleton/wireframe theme. In this post, I&#8217;m briefly reviewing 4 themes (atck, blueprint, framework, and zen), made specifically to serve as theme developer&#8217;s starting point. All 4 are listed with their features (as per Drupal project page of each one), with my personal [&#8230;]]]></description> <content:encoded><![CDATA[<p>Simplest way to develop your custom Drupal theme is to start with some skeleton/wireframe theme.</p><p>In this post, I&#8217;m briefly reviewing 4 themes (atck, blueprint, framework, and zen), made specifically to serve as theme developer&#8217;s starting point. All 4 are listed with their features (as per Drupal project page of each one), with my personal &#8220;impressions&#8221; (not based on actual use experience, yet). There&#8217;s also my choice and order of preference for the 4 candidates at the end.<br
/> <span
id="more-303"></span><br
/> <a
href="http://drupal.org/project/atck" class="broken_link" rel="nofollow">Advanced Theme Construction Kit (ATCK)</a> (see also <a
href="http://atck.highervisibilitywebsites.com/" class="broken_link" rel="nofollow">atck homepage</a> and <a
href="http://atck.highervisibilitywebsites.com/builder/" class="broken_link" rel="nofollow">atck on-line layout builder tool</a>)</p><blockquote><p> 1. WYSIWYG grid builder<br
/> A browser-based grid builder which produces starter code for a page.tpl.php file. The grid builder itself was originally built by Christos Constandinou and it uses a modified version of Yahoo Grids which is more flexible and easier to customize. With Christos&#8217; permission (thanks, Christos!) it, and the supporting css, has been customized so that it works for Drupal themes and so that it is css3 valid. Access the builder online (FF only!), or download it and run it locally. [builder cannot be on Drupal.org because of MIT license]</p><p> 2. style.css [separate download because of BSD license]<br
/> style.css contains only the css needed to support what the grid-builder outputs, as well as some general &#8216;resets&#8217;. The only modifications one should need to make here would be if they want to make their layout a fixed width and/or a different width (default widths are in %).</p><p> 3. page-layout.css and template.php<br
/> These files are where the visual styling of the site happens. The source of these files is from a combination of code from the Hunchbaque theme and some changes/additions which I added in order to provide baseline settings I prefer and/or provide more granular settings. The beauty of these files is the simplicity of them &#8211; they include as little markup/styling as possible to avoid complexity, while at the same time putting many helpful tools/comments at your finger tips so that you can accomplish what you want.</p><p> 4. page.tpl.php<br
/> A sample page.tpl.file is included as a reference for finishing your own page.tpl.php file using code output from the grid builder. Note particularly the variable names for the blocks, regions, menus, etc. (at this point the builder does not include those items)</p><p> 5. fix-ie-6.css and fix-ie-7.css<br
/> These files are included for purposes of providing IE-only css to each of the respective versions. By using conditional comments like this we keep the main css files hack-free and atck css3 valid.</p></blockquote><p><strong>Impression:</strong> atck is very easy to make initial block layout from scratch (thanks to builder), it has separate fix-CSSs for IE6 and IE7, is very flexible even in complicated grids, and is code-documented.</p><p><a
href="http://drupal.org/project/blueprint" class="broken_link" rel="nofollow">Blueprint: theme for developers</a> (also required: <a
href="http://code.google.com/p/blueprintcss/">Blueprint CSS Framework</a>)</p><blockquote><p> * normalizes Drupalâ€™s CSS to be consistent<br
/> * properly aggregates all blueprint CSS files into a single file when this setting is enabled<br
/> * put scripts at bottom of page for nice performance gains, read more: http://developer.yahoo.com/performance/rules.html#js_bottom<br
/> * flexible layout, from 1 to 3 columns, based on where you configure your blocks to show (left, centre, right)<br
/> * SEO optimization without the need for heavy modules and additional queries per page<br
/> o automatically adds META description to many pages, read more: http://googlewebmastercentral.blogspot.com/2007/09/improve-snippets-with&#8230;<br
/> o automatically adds META keywords if taxonomy exists on that node, read more: http://searchengineland.com/070905-194221.php<br
/> * better forum icons, http://drupal.org/node/102743#comment-664157<br
/> * improve forum display and performance, http://www.sysarchitects.com/node/70<br
/> * prevents duplicate form submissions with jQuery, read more<br
/> * shows the # of comments below a node since Drupal doesnâ€™t do this by default (usability)<br
/> * highlight any comments by the author of the node<br
/> * adds a â€œyou need to login / registerâ€ box below all comments if you canâ€™t add a comment (usability)<br
/> * supports conditional comment subjects, if the setting is off it wonâ€™t show a chopped off title of the comment<br
/> * uses CSSEdit http://macrabbit.com/cssedit/ comments for grouping of styles<br
/> * lots of comments and theming tricks in template.php to learn from <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p></blockquote><p><strong>Impression:</strong> blueprint has some not-really-theme-design-related features; blueprint is a whole framework with docs; it has single ie.css for fixes; it requires framework knowledge; blueprint&#8217;s css modifications aren&#8217;t easy (em-to-px and px-to-em conversions).</p><p><a
href="http://drupal.org/project/framework" class="broken_link" rel="nofollow">Framework theme: blank canvas for theme developers</a></p><blockquote><p># Framework gives general placement and formatting to basic Drupal elements<br
/> # Fixed width of 960px by default. Main column resizes between two-column and three-column layouts<br
/> # CSS file is highly organized, including a table of contents, colour codes, section flags, alphabetical properties, etc.<br
/> # Includes a list of CSS utility classes for easy content formatting<br
/> # W3C valid CSS 2.1 / XHTML 1.0 Strict<br
/> # Verified and tested with Firefox 3, Firefox 2, IE7, IE6, Safari 3<br
/> # Search in sidebar (as a block) and header (as a theme configuration option)<br
/> # Clean and simplified code and file structure<br
/> # Works nicely in mobile browsers<br
/> # The administration section is adapted from the default Garland theme</p></blockquote><p><strong>Impression:</strong> good and simple starting point; code-documented; has ie.css and ie-6.css fix files; far lighter and easier than blueprint, but less capable than atck.</p><p><a
href="http://drupal.org/project/zen" class="broken_link" rel="nofollow">Zen: starting theme for Drupal</a> (plus <a
href="http://drupal.org/node/193318" class="broken_link" rel="nofollow">online docs</a>)</p><blockquote><p> * Well documented php and css files.<br
/> * Lots of easy-to-access classes and ids for CSS developers.<br
/> * Classes on body include items like &#8220;logged-in&#8221;, &#8220;not-logged-in&#8221;, &#8220;front&#8221;, &#8220;not-front&#8221;, as well as the node type (&#8220;node-type-story&#8221;, &#8220;node-type-blog&#8221;, etc) for single node pages. This can allow CSS developers to do things like have a different colour for a given page item for non-logged-in users, have a larger header section on the front page, or put a different background colour on a given node type.<br
/> * Automatic (table-less) column resizing for 1, 2, and 3-column layouts.<br
/> * Separate layout.css file to allow for changing the type of column layout (holy grail, jello mold, etc).<br
/> * A print.css file optimizes print display automatically when sent to a printer â€” removes, sidebars and nav elements, optimizes font size, adds text to links showing href, etc.</p></blockquote><p><strong>Impression:</strong> code-documented <em>plus</em> extensive <a
href="http://drupal.org/node/193318" class="broken_link" rel="nofollow">online documentation</a>; has print.css; has sub-theming guidelines to simplify future support and enhancements of customized sub-themes (has a STARTERKIT sub-theme ready for customizations); also has &#8220;happy user testimonials&#8221; :). For one of the new Drupal-based projects I decided to try this one. Next in line are (in order of preference): atck for complex layouts *or* framework for simple sites, and blueprint isn&#8217;t quite to my liking (so far at least).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&amp;linkname=Drupal%20theme%20development%3A%20where%20to%20start" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&amp;linkname=Drupal%20theme%20development%3A%20where%20to%20start" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&amp;linkname=Drupal%20theme%20development%3A%20where%20to%20start" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&amp;linkname=Drupal%20theme%20development%3A%20where%20to%20start" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&amp;linkname=Drupal%20theme%20development%3A%20where%20to%20start" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F08%2Fdrupal-theme-development-where-to-start.html&#038;title=Drupal%20theme%20development%3A%20where%20to%20start" data-a2a-url="https://bogdan.org.ua/2008/06/08/drupal-theme-development-where-to-start.html" data-a2a-title="Drupal theme development: where to start"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/06/08/drupal-theme-development-where-to-start.html/feed</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Ad Unit Guidelines</title><link>https://bogdan.org.ua/2008/06/07/ad-unit-guidelines.html</link> <comments>https://bogdan.org.ua/2008/06/07/ad-unit-guidelines.html#comments</comments> <pubDate>Sat, 07 Jun 2008 21:45:46 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[XHTML/CSS]]></category> <category><![CDATA[ad]]></category> <category><![CDATA[guideline]]></category> <category><![CDATA[size]]></category> <category><![CDATA[unit]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=304</guid> <description><![CDATA[When either consulting on a new website design, or actually designing one, keep in mind Ad Unit Guidelines if the website is going to use advertising. The list is far not exhaustive, but sufficiently standard.]]></description> <content:encoded><![CDATA[<p>When either consulting on a new website design, or actually designing one, keep in mind <a
href="http://www.iab.net/iab_products_and_industry_services/1421/1443/1452">Ad Unit Guidelines</a> if the website is going to use advertising. The list is far not exhaustive, but sufficiently standard.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&amp;linkname=Ad%20Unit%20Guidelines" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&amp;linkname=Ad%20Unit%20Guidelines" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&amp;linkname=Ad%20Unit%20Guidelines" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&amp;linkname=Ad%20Unit%20Guidelines" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&amp;linkname=Ad%20Unit%20Guidelines" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F06%2F07%2Fad-unit-guidelines.html&#038;title=Ad%20Unit%20Guidelines" data-a2a-url="https://bogdan.org.ua/2008/06/07/ad-unit-guidelines.html" data-a2a-title="Ad Unit Guidelines"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/06/07/ad-unit-guidelines.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Does background-image display on top of background-color?</title><link>https://bogdan.org.ua/2007/04/10/does-background-image-display-on-top-of-background-color.html</link> <comments>https://bogdan.org.ua/2007/04/10/does-background-image-display-on-top-of-background-color.html#comments</comments> <pubDate>Tue, 10 Apr 2007 13:03:27 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Notepad]]></category> <category><![CDATA[XHTML/CSS]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/2007/04/10/does-background-image-display-on-top-of-background-color.html</guid> <description><![CDATA[Yes, it should. When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image). (CSS 2.1) When setting a [&#8230;]]]></description> <content:encoded><![CDATA[<p>Yes, it <em>should</em>.<br
/> <span
id="more-166"></span></p><blockquote><p>When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image). (<a
href="http://www.w3.org/TR/CSS21/colors.html">CSS 2.1</a>)</p></blockquote><blockquote><p>When setting a background image, one should also set a background color that will be used when the image is unavailable. When the image is available, it is overlaid on top of the background color. (<a
href="http://www.w3.org/TR/REC-CSS1/#background-image">CSS 1</a>)</p></blockquote><p>Single-line use of &#8216;background&#8217;:</p><div
id="ig-sh-1" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">background</span><span
style="color: #00AA00;">:</span> <span
style="color: #cc00cc;">#EE45AF</span> <span
style="color: #993333;">url</span><span
style="color: #00AA00;">&#40;</span><span
style="color: #ff0000;">&quot;back.gif&quot;</span><span
style="color: #00AA00;">&#41;</span> <span
style="color: #993333;">no-repeat</span> <span
style="color: #993333;">fixed</span> <span
style="color: #000000; font-weight: bold;">right</span> <span
style="color: #000000; font-weight: bold;">bottom</span><span
style="color: #00AA00;">;</span></div></li></ol></div></div><p>Order of elements:<br
/> [background-color] | [background-image] | [background-repeat] | [background-attachment] | [background-position]</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&amp;linkname=Does%20background-image%20display%20on%20top%20of%20background-color%3F" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&amp;linkname=Does%20background-image%20display%20on%20top%20of%20background-color%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&amp;linkname=Does%20background-image%20display%20on%20top%20of%20background-color%3F" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&amp;linkname=Does%20background-image%20display%20on%20top%20of%20background-color%3F" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&amp;linkname=Does%20background-image%20display%20on%20top%20of%20background-color%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2007%2F04%2F10%2Fdoes-background-image-display-on-top-of-background-color.html&#038;title=Does%20background-image%20display%20on%20top%20of%20background-color%3F" data-a2a-url="https://bogdan.org.ua/2007/04/10/does-background-image-display-on-top-of-background-color.html" data-a2a-title="Does background-image display on top of background-color?"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2007/04/10/does-background-image-display-on-top-of-background-color.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Multiple IEs on one Windows: enabling Printing in IE6</title><link>https://bogdan.org.ua/2007/02/19/multiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html</link> <comments>https://bogdan.org.ua/2007/02/19/multiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html#comments</comments> <pubDate>Mon, 19 Feb 2007 17:56:39 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[XHTML/CSS]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2007/02/19/multiple-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html</guid> <description><![CDATA[After IE7 came out, it got much harder for HTML/CSS coders to maintain compatibility with both IE6 and IE7. IE7 is pushing IE6 out, as it is a high-priority update; however, massive part of users will remain on IE6 for various reasons, not excluding the licensing issues (non-licensed/fake-licensed Windows XP will not let install IE7). [&#8230;]]]></description> <content:encoded><![CDATA[<p>After IE7 came out, it got much harder for HTML/CSS coders to maintain compatibility with both IE6 and IE7.<br
/> IE7 is pushing IE6 out, as it is a high-priority update; however, massive part of users will remain on IE6 for various reasons, not excluding the licensing issues (non-licensed/fake-licensed Windows XP will not let install IE7).</p><p>The problem is: after installing IE7, you no longer have IE6 (which is replaced by IE7).</p><p>However, there is a good and simple solution, enabling one to run IE3 through IE7 on one computer.<br
/> To do so, just install the latest version of IE you want (I assume it&#8217;s IE7), and then point your browser to <a
href="http://browsers.evolt.org/?ie/32bit/standalone">evolt&#8217;s archive of browsers</a> (what an excellent collection!). You will have to &#8220;install&#8221; (just copy, really) each older IE you want into a separate directory, and create a short-cut for each. (You may want to use all-in-one installer, found <a
href="http://tredosoft.com/Multiple_IE">here</a> &#8211; also a great package, though I didn&#8217;t use it.)</p><p>After I installed IE6, I also copied some additional files to its folder (like wininet.dll, version 6.00.2900.2180 or like that), to avoid problems with cookies disabled in IE6.</p><p>However, there is a <strong>huge problem with multiple IEs</strong>: Print Preview and Print do not work at all!<br
/> After some searching, I found two bug reports:</p><ul><li>clicking on any bookmark will not load the bookmark, but will open the Print dialogue</li><li>trying to use the bookmark-derived Print dialogue appears not to work: produces blank page</li></ul><p><span
id="more-124"></span><br
/> I tested, and found that <strong>printing after clicking some bookmark produces the print version of the bookmark&#8217;s address!</strong> Actually, this allows to use some PDF-printers (like the free PrimoPDF) for Print Previews in IE6, installed as an additional browser together with IE7. You just have to:</p><ol><li>load the page you need to print-preview</li><li>bookmark it</li><li>try to open that bookmark</li><li>print dialogue appears. just print using your favourite PDF-printer driver</li><li>voila! you have the printed version of the page you loaded on the 1st step!</li></ol><p>That is it. If you know better solution &#8211; please comment. I would be glad to have normal Print Preview function in my IE6&#8230;</p><p><ins
datetime="2007-03-10T13:33:58+00:00">Update:</ins> I still have to check/confirm this finding, but it appears that the method described above actually utilizes IE7&#8242;s print and print preview DLLs, thus it&#8217;s impossible (even with the described trick) to see print and print preview as they really appear in IE6. I am working on this, trying to identify the necessary DLL files to put into IE6 folder to make it use IE6&#8242;s print and preview&#8230; Please comment if you know the solution.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&amp;linkname=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&amp;linkname=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&amp;linkname=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&amp;linkname=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&amp;linkname=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fmultiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html&#038;title=Multiple%20IEs%20on%20one%20Windows%3A%20enabling%20Printing%20in%20IE6" data-a2a-url="https://bogdan.org.ua/2007/02/19/multiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html" data-a2a-title="Multiple IEs on one Windows: enabling Printing in IE6"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2007/02/19/multiple-concurrent-ies-ie6-and-ie7-on-one-windows-enabling-printing-in-ie6.html/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Vertically align text to bottom within div</title><link>https://bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html</link> <comments>https://bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html#comments</comments> <pubDate>Mon, 19 Feb 2007 07:48:40 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[XHTML/CSS]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html</guid> <description><![CDATA[I was looking to solve this extremely common problem &#8211; when you need to vertical-align:top/middle/bottom something within the DIV element. So far not a single solution fits my exact case, but I collected different solutions here for convenient reference. vertical-align CSS property should be applied to the inline element within your DIV (which is a [&#8230;]]]></description> <content:encoded><![CDATA[<p>I was looking to solve this extremely common problem &#8211; when you need to vertical-align:top/middle/bottom something within the DIV element. So far not a single solution fits my exact case, but I collected different solutions here for convenient reference.</p><ul><li>vertical-align CSS property should be applied to the <strong>inline</strong> element within your DIV (which is a block element), and NOT to the DIV itself. For this to work, you may need to set line-height and font-size to the height of the enveloping DIV element:<div
id="ig-sh-2" class="syntax_hilite"><div
class="code"><ol
class="html4strict" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #009900;">&lt;<span
style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #009900;">&lt;<span
style="color: #000000; font-weight: bold;">img</span> <span
style="color: #000066;">src</span><span
style="color: #66cc66;">=</span><span
style="color: #ff0000;">&quot;/images/demoBoxH.gif&quot;</span> <span
style="color: #000066;">alt</span><span
style="color: #66cc66;">=</span><span
style="color: #ff0000;">&quot;&quot;</span> <span
style="color: #66cc66;">/</span>&gt;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #009900;">&lt;<span
style="color: #66cc66;">/</span><span
style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></li></ol></div></div><div
id="ig-sh-3" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">div<span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">200px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">width</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">200px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">background</span><span
style="color: #00AA00;">:</span><span
style="color: #000000; font-weight: bold;">blue</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">text-align</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">center</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">line-height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">200px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">font-size</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">200px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">*&gt;</span>div<span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">font-size</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">12px</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">img<span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span
style="color: #000000; font-weight: bold;">vertical-align</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">middle</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div></li><li>there is a different approach: for the element within your DIV, set display:absolute and bottom:0px (or top:0px) to vertically align to bottom or top, respectively. Note that this approach doesn&#8217;t let aligning to &#8220;middle&#8221;, and that it works best when only one block-level element is aligned &#8211; otherwise elements will overlap at the bottom/top of container DIV. Container DIV should be set to position:relative.</li><li>another approach: we can set the container DIV to<div
id="ig-sh-4" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">div <span
style="color: #00AA00;">&#123;</span><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">table-cell</span><span
style="color: #00AA00;">;</span><span
style="color: #000000; font-weight: bold;">vertical-align</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">middle</span><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p> because for table cells vertical-align property works as one might expect from common sense and the text-align property. Basically, by doing so we ask the browser to treat our DIV as a table-cell, where vertical-align works just perfectly. However, this approach appears not to work on most IE browsers (probably except for IE7 only, but I didn&#8217;t try, as I need IE6 support as well).</li><li>one more table-cell-display-based solution by <a
href="http://bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html#comment-78725">Nikola</a>:<div
id="ig-sh-5" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #6666ff;">.nav_next</span> a <span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span> <span
style="color: #993333;">table-cell</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">width</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">85px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">text-align</span><span
style="color: #00AA00;">:</span> <span
style="color: #993333;">center</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">padding-top</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">60px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">position</span><span
style="color: #00AA00;">:</span> <span
style="color: #993333;">relative</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">top</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">60px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #000000; font-weight: bold;">margin-top</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">-60px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p> This time, display:table-cell is applied to the immediate text container (anchor in the example), and then padding-top is added to push text to the bottom. Should work in FF3 and IE6; in FF3, this solution worked in a test setup without the last 3 CSS attributes, but YMMV.</li><li>vertical alignment can be simulated with margins, applied to the element(s) within the container DIV. This is a simple approach and I would recommend it, if the heights of the container and elements within it are known (otherwise, this method is of no help). Example application of this method: if you have a DIV container 200px high, and need to position some SPANed text within it; first, set SPAN to<div
id="ig-sh-6" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">span <span
style="color: #00AA00;">&#123;</span><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">block</span><span
style="color: #00AA00;">;</span> <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">20px</span><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p> (or whatever height value fits your requirements), and then set margins to vertically align the SPAN. To align your SPAN to top, you would apply<div
id="ig-sh-7" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">span <span
style="color: #00AA00;">&#123;</span><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">block</span><span
style="color: #00AA00;">;</span> <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">20px</span><span
style="color: #00AA00;">;</span><span
style="color: #000000; font-weight: bold;">margin-bottom</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">180px</span><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p> to your SPAN; to align to bottom &#8211;<div
id="ig-sh-8" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">span <span
style="color: #00AA00;">&#123;</span><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">block</span><span
style="color: #00AA00;">;</span> <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">20px</span><span
style="color: #00AA00;">;</span><span
style="color: #000000; font-weight: bold;">margin-top</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">180px</span><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p> to align in the middle &#8211;<div
id="ig-sh-9" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">span <span
style="color: #00AA00;">&#123;</span><span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span><span
style="color: #993333;">block</span><span
style="color: #00AA00;">;</span> <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">20px</span><span
style="color: #00AA00;">;</span><span
style="color: #000000; font-weight: bold;">margin</span><span
style="color: #00AA00;">:</span><span
style="color: #933;">90px</span> <span
style="color: #933;">0px</span><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div></li></ul><p>References:</p><ul><li><a
target="_blank" href="http://www.ibloomstudios.com/articles/vertical-align_misuse/">reference 1</a></li><li><a
target="_blank" href="http://www.ibloomstudios.com/article9sample1.php" class="broken_link" rel="nofollow">reference 2</a></li><li><a
target="_blank" href="http://www.ibloomstudios.com/articles/applied_css_vertical-align/">reference 3</a></li><li><a
target="_blank" href="http://archivist.incutio.com/viewlist/css-discuss/39920" class="broken_link" rel="nofollow">reference 4</a></li><li><a
target="_blank" href="http://archivist.incutio.com/viewlist/css-discuss/39922" class="broken_link" rel="nofollow">reference 5</a></li><li><a
target="_blank" href="http://www.student.oulu.fi/~laurirai/www/css/middle/" class="broken_link" rel="nofollow">another methods collection</a></li></ul><p>(The problem I have involves vertically aligning two DIVs within a container DIV so that DIV1 is aligned to top, and DIV2 is aligned to bottom, and their content is aligned appropriately to top/bottom, and that it works in at least IE6, IE7, FF2. If anyone has a ready solution &#8211; please comment. When I find mine, I&#8217;ll add it to the list above.)</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&amp;linkname=Vertically%20align%20text%20to%20bottom%20within%20div" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&amp;linkname=Vertically%20align%20text%20to%20bottom%20within%20div" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&amp;linkname=Vertically%20align%20text%20to%20bottom%20within%20div" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&amp;linkname=Vertically%20align%20text%20to%20bottom%20within%20div" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&amp;linkname=Vertically%20align%20text%20to%20bottom%20within%20div" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2007%2F02%2F19%2Fvertically-align-text-to-bottom-within-div.html&#038;title=Vertically%20align%20text%20to%20bottom%20within%20div" data-a2a-url="https://bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html" data-a2a-title="Vertically align text to bottom within div"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2007/02/19/vertically-align-text-to-bottom-within-div.html/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>IE (Internet Explorer) margin doubling bug fixes</title><link>https://bogdan.org.ua/2006/09/27/ie-internet-explorer-margin-doubling-bug-fixes.html</link> <comments>https://bogdan.org.ua/2006/09/27/ie-internet-explorer-margin-doubling-bug-fixes.html#comments</comments> <pubDate>Wed, 27 Sep 2006 13:05:23 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[XHTML/CSS]]></category> <category><![CDATA[bug]]></category> <category><![CDATA[double]]></category> <category><![CDATA[fix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[IE]]></category> <category><![CDATA[margin]]></category> <guid
isPermaLink="false">http://www.bogdan.org.ua/2006/09/27/ie-internet-explorer-margin-doubling-bug-fixes.html</guid> <description><![CDATA[In Internet Explorer for Windows (tested with version 6 SP2), if you write CSS code similar to this: #floatbox &#123; &#160; float: left; &#160; width: 150px; &#160; height: 150px; &#160; margin-left: 100px; &#125; and put your &#8220;floatbox&#8221; inside a container (such as DIV), you will actually see 200px of the left margin instead of the [&#8230;]]]></description> <content:encoded><![CDATA[<p>In Internet Explorer for Windows (tested with version 6 SP2), if you write CSS code similar to this:</p><div
id="ig-sh-10" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #cc00cc;">#floatbox</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">float</span><span
style="color: #00AA00;">:</span> <span
style="color: #000000; font-weight: bold;">left</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">width</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">150px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">150px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">margin-left</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">100px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p>and put your &#8220;floatbox&#8221; inside a container (such as DIV), you will actually see 200px of the left margin instead of the expected 100px. This problem is known as &#8220;IE margin-doubling bug&#8221;.</p><p>In this post I collected solutions you can use to avoid this problem. The solution I&#8217;d recommend is at the end.<br
/> <span
id="more-40"></span><br
/> The first solution is to apply some minimal height to the container:</p><div
id="ig-sh-11" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">*</span> html <span
style="color: #6666ff;">.visualIEFloatFix</span> <span
style="color: #00AA00;">&#123;</span> <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">0.01%</span><span
style="color: #00AA00;">;</span> <span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p>This method is described in more details <a
href="http://plone.org/documentation/kb/internet-explorer-invisible-text">here</a> , and even better <a
href="http://plone.org/documentation/kb/ie-double-margin-bug">here</a>.</p><p>Another one is to apply position:relative, this is quite an old solution, described <a
href="http://www.communitymx.com/content/article.cfm?cid=C37E0">here</a> (there are also other fixes for the problem there, too; link returned error at the time of writing, might be a temporal problem &#8211; if not, please remind me to remove it).</p><p>Another solution is to wrap the element in another one, and apply float to that another. Removing float from the element helps avoid the trouble. This fix found <a
href="http://www.positioniseverything.net/explorer/floatIndent.html">here</a>. There are lots of examples there, too.</p><p>You can also set display:inline, as described in <a
href="http://www.positioniseverything.net/explorer/doubled-margin.html">this solution</a>. I would recommend using this one as the most clean and compatible. To apply it to our example at the beginning, we should write the following CSS code:</p><div
id="ig-sh-12" class="syntax_hilite"><div
class="code"><ol
class="css" style="font-family:monospace;"><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #6666ff;">.floatbox</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#123;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">float</span><span
style="color: #00AA00;">:</span> <span
style="color: #000000; font-weight: bold;">left</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">width</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">150px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">height</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">150px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">margin-left</span><span
style="color: #00AA00;">:</span> <span
style="color: #933;">100px</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span
style="color: #000000; font-weight: bold;">display</span><span
style="color: #00AA00;">:</span> <span
style="color: #993333;">inline</span><span
style="color: #00AA00;">;</span></div></li><li
style="font-weight: normal; vertical-align:top;"><div
style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span
style="color: #00AA00;">&#125;</span></div></li></ol></div></div><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&amp;linkname=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&amp;linkname=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&amp;linkname=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&amp;linkname=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&amp;linkname=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2006%2F09%2F27%2Fie-internet-explorer-margin-doubling-bug-fixes.html&#038;title=IE%20%28Internet%20Explorer%29%20margin%20doubling%20bug%20fixes" data-a2a-url="https://bogdan.org.ua/2006/09/27/ie-internet-explorer-margin-doubling-bug-fixes.html" data-a2a-title="IE (Internet Explorer) margin doubling bug fixes"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2006/09/27/ie-internet-explorer-margin-doubling-bug-fixes.html/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>