<?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>DWcourse: Adobe Dreamweaver Blog &#187; CSS postitioning</title>
	<atom:link href="http://www.dwcourse.com/dreamweaver/tag/css-postitioning/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dwcourse.com</link>
	<description>Tutorials, Tips &#38; Help Adobe Creative Suite CS3 through CS6</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:34:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>12-Step Program for CSS&#8217;oholics</title>
		<link>http://www.dwcourse.com/dreamweaver/12-step-program-css.php</link>
		<comments>http://www.dwcourse.com/dreamweaver/12-step-program-css.php#comments</comments>
		<pubDate>Wed, 04 Aug 2010 20:07:39 +0000</pubDate>
		<dc:creator>dwcourse</dc:creator>
				<category><![CDATA[Dreamweaver CSS]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Tip of the Day]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS postitioning]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.dwcourse.com/?p=1443</guid>
		<description><![CDATA[Hi, my name is Jim and I&#8217;m a CSS&#8217;oholic. I remember my first floated div. It was heaven. Soon I escalated to CSS rollovers buttons and list-based menus. I was on top of the world! And then, the downward spiral began. Before I realized what was happening, I found myself watching the sun come up [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Hi, my name is Jim and I&rsquo;m a CSS&rsquo;oholic.</p>
<p>I remember my first floated div. It was heaven. Soon I escalated to CSS rollovers buttons and list-based menus. I was on top of the world!</p>
<p>And then, the downward spiral began. Before I realized what was happening, I found myself watching the sun come up over the lonely back alleys off the information superhighway as I hunted for one more CSS fix that would finally get my pixels aligned.</p>
<p>And then a friend took me to a CSS Anonymous meeting. I was skeptical at first but, thanks, to CA I&rsquo;m on the road to recovery. Sure, I still face the occasional dawn with a mouse in one hand and an empty can of Red Bull in the other. I know I&rsquo;ll always be a CSS&rsquo;oholic but with the help of the 12 Step CSS Anonymous program at least I&rsquo;m getting more sleep.</p>
<p><span id="more-1443"></span></p>
<h2><strong>12 Steps to Conquering CSS&rsquo;aholism</strong></h2>
<p>When faced with an impossible deadline and uncooperative CSS.</p>
<ol>
<li><strong>Just say &ldquo;NO!&rdquo;</strong> &nbsp;Why waste time making your page look perfect in Explorer 6? If the user cared what your pages look like, he wouldn&rsquo;t be using IE6. &nbsp;</li>
<li><strong>Back up:</strong> Now. And now! And NOW! When you stretch the limits of your CSS knowledge, the code will probably break before you do. When that happens a backup means you&rsquo;ve only wasted time not trashed your site.</li>
<li><strong>Search:</strong> OK, I know Google is probably the first place you turn when faced with a CSS issue but do you use it effectively? Here are few suggestions:
<ul>
<li><strong>Construct your query carefully:</strong> You&rsquo;ll get better results and the very process of refining your query may lead to the solution.</li>
<li><strong>Focus on newer results:</strong> Web design has come along way in a very short time. By limiting your results to the last year you can eliminate a lot of once good advice that&rsquo;s gone bad.</li>
<li><strong>Bookmark sites that come up regularly:</strong> There&rsquo;s a reason you keep stumbling across sites like W3.org and W3schools.com. </li>
</ul>
</li>
<li><strong>Exploit forums:</strong> Online forums are full of CSS enablers. I try to be active in forums where the people are knowledgeable and help and usually, when I need help, it&rsquo;s offered.</li>
<li><strong>Tweet:</strong> It seems crazy to think you can get the answer to a complex question in the 140 characters Twitter allows but:
<ul>
<li>Distilling your issue into a question of 140 characters helps you focus on the real problem.</li>
<li>You don&rsquo;t need THE answer; you just need the idea that leads to it.<br />
        <em>Of course, if you&rsquo;re not active on Twitter, when you desperately need help probably isn&rsquo;t the time to get started.</em></li>
</ul>
</li>
<li><strong>Take a time out:</strong> What works for kids, works for adults. A brief break can help you approach the problem from a fresh perspective.</li>
<li><strong>Compare your code to code that works: </strong>If you&rsquo;re customizing standard code (like Dreamweaver&rsquo;s built-in Spry) invest in software such as BBedit (Mac) or TextWrangler (PC) that allows you to compare your copy of a document to a virgin, working copy. Then you&rsquo;ll only need to worry about the code you know has changed.</li>
<li><strong>Get the big picture:</strong> Does your issue occur on one page or many?
<ul>
<li>If your pages share a fixed structure and only one page is broken, the problem is probably in the unique content of that page. </li>
<li>If the problem occurs throughout your site or in a particular section of your site then focus on the elements that are common to those pages.</li>
</ul>
</li>
<li><strong>Narrow your focus: </strong>
<ul>
<li><strong>Where&rsquo;s the break?</strong> If everything after X is whacky, the problem probably occurs at or before X.</li>
<li><strong>Which browser(s): </strong>Does the problem occur in one browser (think Internet Explorer) or multiple browsers? Since each browser has its own quirks, pinpointing the problem browser can help you locate a solution.</li>
<li><strong>Validate: </strong>I&rsquo;ve got nothing against a bit of invalid HTML or CSS if things still work but a <a href="http://jigsaw.w3.org/css-validator/">validator</a> can quickly locate unclosed tags, syntax issues and other potential problems.</li>
</ul>
</li>
<li><strong>Start over:</strong> It&rsquo;s tough to abandon several hours of work and start over or revert to a backup but, if you&rsquo;ve spent several hours trying to solve a problem and haven&rsquo;t, then you&rsquo;ve probably spent those hours making it worse. The second time through the process you&rsquo;ll know the issue (if not the solution) and, by working methodically and checking for the problem after each step, you&rsquo;ll be able to pinpoint the problem if it happens again.</li>
<li><strong>Break something else:</strong> Sometimes it&rsquo;s simpler just to accept that you can&rsquo;t fix every issue and adapt your design accordingly. For instance, if you can&rsquo;t get rid of a pesky border on the left, try adding one on the right. </li>
<li><strong>Write it down:</strong> When you learn a new bit of code, develop a new technique or discover a new resource, write it down. That way, the next time you fall off the CSS wagon at least at least the answer will be close at hand.</li>
</ol>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=12-Step+Program+for+CSS%E2%80%99oholics+http%3A%2F%2Fbit.ly%2FtD1EVY" title="Post to Twitter"><img class="nothumb" src="http://www.dwcourse.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.dwcourse.com/dreamweaver/12-step-program-css.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Center an HTML Page Layout</title>
		<link>http://www.dwcourse.com/dreamweaver/centering-page-layout.php</link>
		<comments>http://www.dwcourse.com/dreamweaver/centering-page-layout.php#comments</comments>
		<pubDate>Thu, 18 Jun 2009 19:15:35 +0000</pubDate>
		<dc:creator>dwcourse</dc:creator>
				<category><![CDATA[Page Design]]></category>
		<category><![CDATA[Tip of the Day]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS postitioning]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dwcourse.com/?p=315</guid>
		<description><![CDATA[Update: The directions here have been updated to accomodate absolutely positioned divs. Thanks to Dianne Lewandowski for pointing out the issue. You can also view my video on Centering a CSS web page layout… I thought I'd expand a bit on my answer to a question from Brandon85 on Twitter. He asked: Why is this so [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Update:</strong> The directions here have been updated to accomodate absolutely positioned divs. Thanks to Dianne Lewandowski for pointing out the issue. You can also view my video on <a href="/dreamweaver/centering-a-web-layout.php">Centering a CSS web page layout</a>…</p>
<p>I thought I'd expand a bit on my answer to a question from <a title="Brandon" href="http://twitter.com/Brandon85" target="_blank">Brandon85</a> on Twitter. He asked:</p>
<blockquote><p><span><span id="msgtxt2222785130">Why is this so hard!! How do you Center a website in the browser using Dreamweaver?</span></span></p></blockquote>
<p><span><span>Actually, it's relatively easy (if you know how).<span id="more-315"></span></span></span></p>
<ol>
<li>Begin by selecting your entire page in Design View.</li>
<li>Select menu: Insert&gt;Layout Objects&gt;Div Tag (or click on Insert Div Tag in the Common tab of the Insert Palette).</li>
<li>In the Insert Div Tag dialog:
<ol>
<li>Select Wrap Around Selection (your entire design) from the Insert menu.</li>
<li>Leave the Class field empty</li>
<li>Type "wrapper" (without the quotes) into the ID field (this is assuming you don't already have an item with the ID "wrapper."</li>
<li>Click the New CSS Rule button.</li>
</ol>
</li>
<li>In the New CSS rule dialog
<ol>
<li>ID should already be selected in the Selector Type menu.</li>
<li>#wrapper should have been automatically inserted into the Selector Name field.</li>
<li>Decide whether the new style should be in the current document or a new or existing style sheet and make your selection in the Rule Definition menu .</li>
<li>Click the OK button.</li>
</ol>
</li>
<li>In the CSS Rule Definition dialog:
<ol>
<li>Select the Box category.
<ol>
<li>Type in a Width. By default the horizontal width of a div is 100% so you need to set a width for the wrapper div to properly center it. Logically this should be the width (most likely in pixels) of your page design.</li>
<li>Uncheck the Same for All option under Margin.</li>
<li>Set the Right margin to auto by selecting auto in the pop-up menu to the right of the Right field.</li>
<li>Set the Left margin to auto using the same method.</li>
</ol>
</li>
<li>Select the Block category
<ol>
<li>Select left from the Text-Align menu (I'll tell you why in a moment).</li>
</ol>
</li>
<li>Select the Positioning category
<ol>
<li>Select relative from the Position menu. This forces any absolutely positioned divs in your page to align relative to the "wrapper" div rather than the browser window. See <a href="http://dwcourse.com/css-div-positioning">CSS positioning</a> for more information on positioning.</li>
</ol>
</li>
<li>Click OK</li>
</ol>
</li>
</ol>
<p>Your design should now be centered but we still have one step to go.</p>
<p><strong><em>Correction: </em></strong><em>The following work-around was originally mislabeled. It is intended for IE5 compatibility (and can probably be ignored by most folks)</em></p>
<p><strong>Work-Around for Internet Explorer 5</strong>: If desired, we'll need an additional fix to make this IE5 friendly.</p>
<ol>
<li>Set the text-align property of the body style to center (This will center your page layout in IE5)
<ol>
<li>If you already have a body style, double click on it in the Styles Palette to open the CSS Style Definition dialog.</li>
<li>If you don't have a body style, create a new one:
<ol>
<li> Choose menu: Format&gt;CSS Styles&gt;New… (or select New… from the pop-up menu in the upper-right corner of the Styles Palette) <strong>OR</strong></li>
<li>In the New CSS Rule dialog:
<ol>
<li>Choose Tag from the Selector Type menu.</li>
<li>Type "body" into the Selector Name field.</li>
<li>Decide whether the new style should be in the current document or a new or existing style sheet and make your selection in the Rule Definition menu .</li>
<li>Click the OK button to open the CSS Style Definition dialog.</li>
</ol>
</li>
</ol>
</li>
<li>In the CSS Style Definition dialog:
<ol>
<li>Select the Box category.</li>
<li>Select center from the Text-Align menu.</li>
<li>Click OK</li>
</ol>
</li>
</ol>
</li>
</ol>
<p><strong>That explanation I promised</strong>: Setting the text-align property in the body style to center centers your page design but, since styles are inherited in CSS, it also centers all the text on your page. By setting text-align for #wrapper to left, we effectively overrule the centering for all page elements inside of #wrapper (which should be all of the page elements).</p>
<p>Funny how much a 140 character answer on Twitter can grow once it's a blog post!</p>
<p><em>As always, feel free to </em><a style="color: #2361a1; text-decoration: underline; padding: 0px; margin: 0px;" href="mailto:%20jcook@DWcourse.com"><em>email me</em></a><em> with your questions, comments and suggestions. And please follow me on Twitter (</em><a style="color: #2361a1; text-decoration: underline; padding: 0px; margin: 0px;" href="http://twitter.com/dwcourse"><em>DWcourse</em></a><em>) for additional Dreamweaver news and tips.</em></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Center+an+HTML+Page+Layout+http%3A%2F%2Fbit.ly%2FtrHEKi" title="Post to Twitter"><img class="nothumb" src="http://www.dwcourse.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.dwcourse.com/dreamweaver/centering-page-layout.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editing content in absolutely positioned divs in Dreamweaver</title>
		<link>http://www.dwcourse.com/dreamweaver/absolutely-positioned-divs.php</link>
		<comments>http://www.dwcourse.com/dreamweaver/absolutely-positioned-divs.php#comments</comments>
		<pubDate>Thu, 19 Mar 2009 16:17:20 +0000</pubDate>
		<dc:creator>dwcourse</dc:creator>
				<category><![CDATA[Dreamweaver Content Editing]]></category>
		<category><![CDATA[Dreamweaver CSS]]></category>
		<category><![CDATA[absolute positioning]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS postitioning]]></category>
		<category><![CDATA[div]]></category>

		<guid isPermaLink="false">http://dwcourse.com/?p=6</guid>
		<description><![CDATA[Question from @discuit via Twitter: A coder we use has coded the site in Absoloute DIVs, and now we can't select any text in Design view. Any idea how to fix it? Answer: Discuit, hover your cursor over the border of the div you want to edit (even one underneath another layer) until it highlights. Then click [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Question</strong> from @<a href="http://twitter.com/discuit">discuit</a> via Twitter: A coder we use has coded the site in Absoloute DIVs, and now we can't select any text in Design view. Any idea how to fix it?</p>
<p><strong>Answer: </strong>Discuit, hover your cursor over the border of the div you want to edit (even one underneath another layer) until it highlights. Then click on border to select div. Now you can click inside the div and edit as usual.</p>
<p>Alternatively, you can also set the CSS visibility property to hidden for the top div in order to access the underlying div for editing. Just make sure you change it back!</p>
<p>Update: And, of course, I overlooked the obvious. Simply select the div you want to edit in Dreamweaver's AP Elements tab. Once the div is selected,  you can click inside the div and edit as usual.</p>
<p>Follow me on Twitter: @<a href="http://twitter.com/DWcourse">DWcourse</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Editing+content+in+absolutely+positioned+divs+in+Dreamweaver+http%3A%2F%2Fbit.ly%2Fv9Z9sW" title="Post to Twitter"><img class="nothumb" src="http://www.dwcourse.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.dwcourse.com/dreamweaver/absolutely-positioned-divs.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

