Why is vertical centering still such a challenge?

Is it really still this tricky to code DW to allow easy vertical centering? Just wondering. Tools for web design have been around long enough, and yet, simply vertically centering an image remains... elusive. Sure - if you know exactly how to do it, or remember it, or figure it out.... sometimes I can get it to work with relative ease; other times, not so much.
Really, though - no vertical center button anywhere?  (I may have missed it.)
Now, I admit, I have some homework to do; in the mean time, though, is there any guide someone can recommend?
I'd like to both center divs vertically as well as center their content vertically, and not necessarily both at the same time... preferably using css.
thanks,
Andrew

as to why this is this case is presumably because as the width of an element shrinks, margins-top and position-top and height are contingent on that allowed width.  But margin-top and margin-bottom by default are set to auto. This may make it seem like vertical alignments should occur naturally, but it does not. This is because behind the scenes auto is converted to 0. Meaning that Height auto is automatically set to 100% of its containers height leaving no room for margin-top or margin-bottom.  Vertical formatting of block level normal flow elements, relies on a calculation much like horizontal formatting.  margin-top+border-top+padding-top+height+padding-bottom+border-bottom+margin-bottom must equal its parenting elements height.    However if you use absolutely positioned elements, then if all three of 'top', 'height', and 'bottom' are not auto: If both 'margin-top' and 'margin-bottom' are 'auto', solve for  top+ margin-top+border-top+padding-top+height+padding-bottom+border-bottom+margin-bottom +bottom must equal its parenting elements height. Therefore, margin-top and margin-bottom will be equal values thus vertically centering the element.

Similar Messages

  • Why am I getting messages such as "The command "Image Size" is not currently available" when trying to run an Action that has always worked in the past and when the particular Commands do work if used by themselves?

    Why am I getting messages such as "The command Image Size is not currently available whenever I try to run an Action that uses the particular command (and which has always worked fine previously) and when the particular command works fine when used on its own?

    I would think that image size would always be available when there is an active document in Photoshop.  The only time I remember seeing messages like that where they should work was during the five month period when Adobe released CS6 with so many bugs which took Adobe five months to fix.  During those five month messages like that that should not have happen were common when action switch between documents.  Adobe would start processing the next Action step before the document switch completed, Any step that required an active document could fail with a mess stating the command is not available.
    Are you by some chance using CS6 version 13.0 CS6 without any updates.  Use Photoshop menu Help>About Photoshop.  If it shows CS6 version 13.0 you need to update CS6. .

  • Why old message are still in the mail queue

    Hi all,
    I would like to know why old messages are still in the ims-ms queue and not deliver to recipient?
    qm.maint> summ
    Messages
    Channel Queued Size (Kb) Oldest
    tcp_local 0 0.00
    tcp_intranet 0 0.00
    tcp_auth 0 0.00
    reprocess 0 0.00
    process 0 0.00
    pmxchannel 176 50912.86 4 Dec, 10:06:04
    native 0 0.00
    ims-ms      93    83309.79    3 Dec, 11:25:04
    defragment 0 0.00
    Totals 269 134222.65
    I went to message location and saw the "ZZf0M2s0h2Xp1.HELD" message in /opt/SUNWmsgsr/queue/ims-ms/000
    what does this mean "HELD" messages?
    Anyone can explain in this? thanks.

    Yap wrote:
    I would like to know why old messages are still in the ims-ms queue and not deliver to recipient? As always, what version of messaging server are you running (./imsimta version)?
    qm.maint> summ
    Messages
    Channel Queued Size (Kb) Oldest
    ims-ms      93    83309.79    3 Dec, 11:25:04
    If you run the following command, are the emails all destined to the same user?
    ./imsimta qm
    dir -env ims-msAlso have you experience a core dump/process crash recently (do you have coreadm enabled)?
    I went to message location and saw the "ZZf0M2s0h2Xp1.HELD" message in /opt/SUNWmsgsr/queue/ims-ms/000
    what does this mean "HELD" messages? Refer here:
    http://docs.sun.com/app/docs/doc/819-4428/bgbhg?a=view
    Regards,
    Shane.
    Anyone can explain in this? thanks.

  • I did download Lion and everything is fine, but why in app store still stated DOWNLOAD and not INSTALLED, I already did 3 times and it still in DOWNLOAD label

    I did download Lion and everything is fine, but why in app store still stated DOWNLOAD and not INSTALLED, I already did 3 times and it still in DOWNLOAD label

    My guess is they changed that to Download for all the people who wanted to or needed to download it again. It's kind of a subset of Installed, now. I don't think it is a great solution, but that is what it is.

  • Vertical Centering of a page in GoLive

    I need a help in vertical centering a page. After long trials and with the help of others in this forum I was able a website that is functioning well enough. The only concern is that it needs to be centered vertically. You can see the website on: http://www.chimeddorj.com
    I read the tutorial on the following link, and I liked the 3rd method.
    http://blog.themeforest.net/tutorials/vertical-centering-with-css/
    But it was too complicated for me as I don't use GoLive often enough. I made this website 3 months ago and since then I haven't used it again. As a result I kind of forgot a lot of things that I knew at that time. If you know how to make the Vertical Centering, could you please guide me how to place the codes in right places? I could provide you with necessary files if necessary. You can also see the HTML code sources by clicking the right button on the website that I created. 
    For some people it may be easy as click. Please help me if you can.

    Thank you very much for comment. I tried to use the table method with your codes. It is centering the content horizontally, but not vertically. The contents are stuck to the top as I resize the window. It seems like I am missing some point. I copy and paste my current code. Could you please give me more advice?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta name="generator" content="Adobe GoLive" />
    <title>Mongolian Artist Chimeddorj</title>
    <script src="js/swfobject.js" type="text/javascript" ></script>
    <style type="text/css" media="screen"><!--
    body { text-align: left; }
    a:link { color: silver; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: 600; font-stretch: condensed; line-height: 18px; text-decoration: none; }
    a:visited { color: silver; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: 600; line-height: 18px; text-decoration: none; }
    a:hover { color: black; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: 600; line-height: 18px; text-decoration: none; }
    a:active { color: gray; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: 600; line-height: 18px; text-decoration: none; }
    #Name { color: #633; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: 600; text-decoration: none; }
    .note { color: gray; font-size: 11px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; line-height: 15px; }
    --></style>
    </head>
    <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="100%">
                    <tr align="center" valign="middle">
                        <td align="center" valign="middle">
    <div style="position:relative;width:1060px;height:540px;-adbe-g:p;">
    <div style="position:absolute;top:0px;left:0px;width:700px;height:540px;-adbe-c:c">
    <script type="text/javascript">
    var flashvars = {XMLFile: "paintings.xml"};
    var params = {bgcolor: "#ffffff", allowFullScreen: "true"};
    swfobject.embedSWF("ArtFlashGallery.swf", "myAlternativeContent","700", "540", "10.0.0",false, flashvars, params);
    </script>
    <div id="myAlternativeContent">
    <a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a></div>
    <br />
    <!-- You can't remove the copyright text below if you're using free version --></div>
    </div>
    </td>
    </tr>
    </table>
    </body>
    </html>

  • Why is my ipad still using battery power when switched off & locked away with no one using it?

    Why is my IPad still discharging battery when switched off and locked away - with no one using it?  Charged it to 100% on holiday and locked in safe.  2 days later it was at 76%!

    How is it "switched off"? Are you pressing the button on the top so the screen goes black? If so, that isn't shut off, but put to sleep. I will still be doing things in the background and using battery power.
    To shut it fully off, press and hold the button on top, you will get a notification on the screen that says "Slide to power off". Slide the button and it will turn completly off.
    If this is how you switched it off, let us know and we will see what else we can figure out.

  • HT1222 Why my iphone 5 still cannot install this update? I've clicked the download and install button but it do nothing, im using wifi and the baterry is 100% but still, it do nothing when i've clicked! Help!

    Why my iphone 5 still cannot install this update? I've clicked the download and install button but it do nothing, im using wifi and the baterry is 100% but still, it do nothing when i've clicked! Help!

    Reset the phone (no data loss): Press both the home and power buttons for at least 10 seconds, releasing when the Apple logo appears.  After the phone restarts, try updating again.

  • Why the new iPad still has no Flash

    I wonder why the new iPad still has no flash. I love to take photos with my iPhones and iPads, sometimes a flash could be handy when it's dark.
    I know it could be another nightmare for the Apple case makers.

    Apple has never said why, and rarely does explain decisions like that... my guess is that it would have taken space and power away from something else, it's a pretty tightly-packed product. :-)

  • IPhone: Vertically centering UILabel text

    The UILabel permits horizontal centering of its text via the textAlignment property, but there seems to be no way to align the text vertically. I have 3 labels, the last holding from one line to several. It if only has a single line, the text is vertically centered giving a big gap from he previous text. That looks uncool. (and in the Mac world, cool is everything). Is there some secret magical way to get UILabel to vertically center is text as well, or do I need to abandon labels and just drop down to drawRect.

    Check out NSString(UIStringDrawing). It has the following method, which you can use to calculate the size of the text as it would be in the label. Then you can set the label height to the minimum necessary for the text, which will solve your vertically centering problem.
    sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:

  • Vertically centered file background matching

    How can I have a vertically centered files background match
    the background of the html file? I have seen it work, like for
    example here:
    http://www.aidlindarlingdesign.com/
    You can see mine here which does not have the background
    working yet:
    http://www.agilitygraphics.com/clients/sams
    Looks fine, if the browser window is only 600 or close to
    that high. But if you open it further, the gradient of the file and
    the page background don't match anymore. How would I fix this? Can
    I have a transparent background to the file?
    Thanks a lot for any help with this!

    the aidlindarlingdesign site is using a transparent swf to
    display the soft edges around their content. Google "transparent
    swf" and you will find a multitude of competent tutorials on how to
    do this.

  • I'm using iPhone 4S, why my weekdays alarm still not working?

    I'm using iPhone 4S, why my weekdays alarm still not working?
    By the way, single alarm is working.

    wifi appears to be OFF and ON on my device !.
    but when i used to turn it ON , it is not showing anything.
    just showing as 'searching for devices'.

  • Why the links are still opened in new windows?

    Why the links are still opened in new windows even I selected the option to open in tabs?
    This is one of the web I am reading (sorry that it is in simplified Chinese), I have no problems reading it in tabs in Firefox:
    http://www.sodu.com.cn/mulu_30498.html

    Hi,
    How are you trying to open the windows? Safari does not default to opening new windows in tabs. It can open +external application+ links (e.g. from your email program, RSS viewer, etc) in a new tab, but not links from an existing website.
    To open links in a new tab, you'll need to hold the ctrl key and click the link, or use the middle-mouse button if your mouse has one (or right-click on the link and choose to open it in a new tab).

  • Why are nd filters still used with digital?

    I'm kind of new to the world of DSLRs, but it just occurred to me from what I know, that nd filters should really be a thing of the past. I mean nd filters are just there to reduce the amount of light right? This is such a basic thing to do when dealing with digital imaging. Other than holding onto the past, why wouldn't there be a way to set your ISO as low as 1? Or am I just totally missing something? I know some professional digital video cameras like the sony f65 have internal nd filters, but unless that's a software thing, then that also seems a bit silly. Can someone educate me if I'm not understanding.
    Cheers,
    Cg.
    Canon 6D,Canon EF 24-105mm f/4 L IS USM, Sigma 70-200mm f/2.8 EX DG OS HSM, Sigma 1.4 x EX DG Teleconverter, Canon EF 100mm f/2.8 macro USM, Canon EF 50mm f/1.8, EF 40mm f/2.8 pancake, Sigma AF 8-16mm f/4.5-5.6 DC HSM, Pentax 400mm f/5.6

    Many "effects" filters are no longer required as the effects can be applied with digital editing software... so while it's true that many filters are "a thing of the past", ND filters are _not_ actually "effects" filters.  What they do cannot be simulated by editing an image.
    An "good" ND filter wont change the look of the image itself... everything should appear sharp and without any color cast.  What it does... is change your shooting CIRCUMSTANCES.
    Suppose I'm shooting with an outdoor "fill" flash on a sunny day and my flash can't do "high speed sync" mode... so I'm limited to max flash sync shutters speeds of, say, 1/200th (this varies based on your specific camera model.)  The "Sunny 16" rule says that I the normal exposure for full mid-day sun using f/16 is to use the inverse of the ISO as the shutter speed.  So at a low base ISO of ISO 100, that'd be 1/100th.  But the side-effect of f/16 is a _very_ broad depth of field and suppose I want a deliberately blurred background.  I can increase the shutter to 1/200th and this will let me drop my f-stop to f/11... but that's still a LOT of depth of field and no nicely blurred background.  If I wanted to bring that down to, say, f/4... I'd have to find a way to dump 3 full stops worth of light.    I can't just drop the f-stop to f/4 and increase the shutter by 3 stops to 1/1600th because that's WELL beyond flash-sync speed and my flash (for purposes of this example) can't do high-speed sync.  
    One really great way to dump 3 stops of light so I can drop my f-stop down without having to speed up my shutter is... a 3 stop ND filter (sometimes called an ND 0.9 -- every "0.1" worth of density blocks 1/3rd of a stop of light.)
    Another _VERY_ common use of the ND filter is to get shutters speeds much slower than possible without the filter.
    Suppose I want to take a photo of a waterfall and I want a slow shutter so that I can have that gorgeously blurred dreamy looking water.  At f/16 my shutter is still at 1/100th... I could go to f/22 and drop the shutter to 1/50th... but that's still pretty fast.   If I used 5 stops I could get the shutter down to 1/4 second.  A 10 stop ND (ND 3.0) would let me bring that down to 8 seconds... 
    The final images in these examples would still have the same amount of light and there'd be no tint or color-cast on the images... what you're REALLY doing is changing your shooting "circumstances" which allows you to use different exposure settings than would otherwise be possible without the filter.
    Hope that helps!
    Regards,
    Tim
    Tim Campbell
    5D II, 5D III, 60Da

  • Why are animated GIFs still broken?

    https://discussions.apple.com/thread/1229922 <-- this
    'nuff said, this has been a problem ever since Preview lost its ability to animate GIFs. It may be a WebKit problem (i.e. yeah, Apple, just go ahead and let yourself off the hook...right), but regardless, how come it has not been addressed sooner? Safari chokes after about 4 frames of animation; if the GIF loops, it starts over fresh, but it chokes again.
    I am using 10.5.8, but I am aware this is still a problem for all 10.6 OSes and iOSes. I don't know about Safari for Windows; not relevant at the moment.
    Why is this still a problem after three-and-a-half years of Safari development have passed?

    Well, here are the issues I have run into.
    1) Gifs load half way and then animate on the base but not on the top.
    2) Gifs animate waaaaaaay too fast.
    I have found no solution for the 1st issue, and it does not always occur.
    As for the second one it has to do with browsers all reading the "0 delay" setting of the animation at uniquee speeds. Most round it to 10/100th of a sec, while Safari loads it at 3/100th resulting in a faster images, but a non-standard speed. Which ***** since I am running animations that follow using a set time out only to have safari throw everything off. I think one other browser runs at something like 6/100ths so Safari is not the only one. Faster could be nice if they all got on the same page, but as they are it is pointless. Pretty much meaning if you want an animated gif you have to avoid the "0 delay setting at all costs, and pretty much anything under 1/10th because it will not display the same in many browsers. It could be this fast speed in Safari that is causing the loading and instability issues with sime.

  • Why is my Macbook still slow even after upgrading

    Hi everyone, I'm not sure if this has been answered before but here goes.
    So I have a Macbook 2.4GHz (13.3-inch Intel Core 2 Duo "Penryn") - Early 2008. Have been using it for the past 6 years without any issues. However during the past 1 year I've noticed that it has started to run slower and slower. Even simple task such as opening Safari might take longer than usual. I do not have much application installed as I only used that computer for surfing the net and making Words & spreadsheet documents. I have about 200GB of free hard disk space out of the 250GB standard HDD along with 2 GB of ram. After doing some research around the forum, I decided it might be a good idea to upgrade the HDD to a faster 7200rpm 750GB HDD drive as well as replacing the ram with new 2x2GB modules. I also did a fresh install of OS X Mountain Lion 10.6.8 (I did not install any other applications). But to no avail, it seems that the computer is still laggy and isn't as snappy as couple of years back. And by laggy I mean that opening pre-installed applications on the Mac such as iPhoto and Safari might still take 4-6 "icon bounces" to open.
    So my question is,
    1) What might still be causing the lag?
    2) Are there any other components on a Macbook that might cause it to slow down?
    3) Does components like the CPU degrade over time?
    Any help would be highly appreciated.

    Your computer isn't getting slower, it's other things demanding faster.  If you are installing all the possible updates to software those will be designed for newer computers.  Once you start browsing you're browsing a web designed by people who because they spend all their time designing pages they themselves have powerful machines with fast connections because it is their job.  It's like if all city streets were designed by racecar drivers.  A 2008 computer is already considered vintage by Apple and close to no longer being supported in any manner.  Vintage and obsolete products - http://support.apple.com/kb/HT1752  I have an even older computer than you and it is annoying but that's the way things are.
    Frankly 4-6 icon bounces doesn't sound long to me.  Don't forget that for applications such as iTunes how long it takes to open will also depend upon the size of the library.
    I don't think CPUs wear down.  Conceivably some slow-down could be the result of excessive bad sectors on a hard drive but you say you replaced that (and I would expect it to have shown more serious symptoms were that happening).
    You can use Activity monitor to check your RAM usage.  Newer applications and newer OS versions will require much more RAM than posted "minimum"  If a computer doesn't have enough RAM it starts using the hard drive which is slower than chips.

Maybe you are looking for

  • Exception is being thrown

    I tried out this small code for using hashset but it gives exceptions. I have no idea why is it so? import java.util.HashSet; import java.util.Iterator; import java.util.Set; class Students implements Comparable      private String name;      private

  • The ipod cannot be updated. An unknown error occurred (-4)

    I was prompted to install the new version of iTunes. Then I installed the update software ... and now I'm getting the error message in the subject line. I've tried, reinstalling, rebooting, resetting ... nothing seems to work. What now???

  • When opening firefox, another new tab automatically opens making you search in "yahoo"

    problem as stated in title All Crash Reports Extensions Name Version Enabled ID DownloadHelper 4.9.22 true {b9db16a4-6edc-47ec-a1f4-b86292ed211d} MySearchDial 9.5.5.1 true {ad9a41d2-9a49-4fa6-a79e-71a0785364c8} RoboForm Toolbar for Firefox 7.9.6.7 tr

  • Clarification about static variables declaration

    I'm getting "Illegal Start of Expression" error, When i try to declare a static variable within a static metho or nonstatic method. Could you please clarify me, Is it possible to declare a static varible within a static method or non static method ?

  • IPhone 4S bluetooth not discovering bluetooth devices

    My iPhone 4S bluetooth is not discovering bluetooth devices, specifically my new Platronics Voyager Pro HD headset which worked just fine with the iPhone 4 even after the recent software upgrade.  I noticed that others are having bluetooth discovery