I am trying bring text in middle regarding image but it's not working.  I tried this but not working either    HTML  &lt;div id="z" class="cz"&gt;     &lt;div id="a" class="ca"&gt;          &lt;img src="http://www.skateboardsofchoice.co.uk/assets/meta/130/130/1/blanks_88623933c05cc5bbb9d99ed2fe6a74e6.jpg" /&gt;     &lt;/div&gt;     &lt;div id="b" class="cb"&gt;          &lt;span id="spanID" class="someClass"&gt;Some Text&lt;/span&gt;         &lt;img src="http://www.ucl.ac.uk/Library/Images/ml_big_go.gif" /&gt;     &lt;/div&gt; &lt;/div&gt;   CSS  .cz {      width:100%;      height: 30%;     float:left;     position:relative; }  .ca {      margin: 5px 0px 0px 30px; }  .cb {   position:absolute;     text-align: center;     vertical-align: middle;     right:0;     top:0;     margin: 20px 20px 0px 0px; }
Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; } &lt;div&gt;   &lt;img src="https://via.placeholder.com/30" alt="small img" /&gt;   &lt;span&gt;Doesn't work.&lt;/span&gt; &lt;/div&gt;
Pressure at base of 3 different dam designs The question asks, For which design will the water pressure at the base of the dam wall be the greatest?  The answer is all are equal.    This doesn't make sense to me.  Using the formula: P (pressure) = p (atmospheric pressure) + rho (density) * g (gravity) * y (depth below water surface)    What is confusing me is the y value, the depth below the surface. Yes both red points are the same depth below the water surface. But doesn't the red point in dam III only "see" a smaller column of water above it and so shouldn't it have less pressure on it than the red point in dam II?    Also, I know the formula would give the points at the base of dam I and dam II equal. But why doesn't the extra water in dam II (shaded in black) cause it to have a higher pressure at the base? What is the difference between re.search and re.match? What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it. New tags page mangles tag wiki excerpts What does the "static" modifier after "import" mean? Asymptotic expansion for Fresnel Integrals If you take the fresnel integrals to be $$S(x) = \int_{0}^{x}\sin \left(\frac { \pi \cdot  t^2}{2} \right) dt$$ How do you find the asymptotic expansion? I know it begins with a $1/2$ but how? How can I use variables in the LHS and RHS of a sed substitution? So I'm in Linux and I want to have a program accept arguments when you execute it from the command line.  For example,   ./myprogram 42 -b -s  So then the program would store that number 42 as an int and execute certain parts of code depending on what arguments it gets like -b or -s. Leaving values blank if not passed in str.format . It is a mathematical expression/sequence/set of numbers with the arrow exactly under any one of the numbers (with or without n= 0). How to do it in latex? Any of the up arrow types (single line or double line) shown in the figure is okay. I need to display math in my report, but is it possible to remove the vertical space around align*?  A little example is the following (where I just want the align* to have the same vertical space as a \\  \documentclass[10pt,danish,a4paper,oneside,fleqn]{report}  \usepackage[english]{babel} \usepackage{amsmath}  \begin{document}  ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \begin{align*}   A{\cap}B\ &amp; =\ {\left\{{b,d,e}\right\}}{\;}{\cap}{\;}{\left\{{a,b,f,g}\right\}}   \\   \nonumber\ &amp; =\ {\left\{{b}\right\}} \end{align*} ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \\ ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss  \end{document} How do I remove duplicate items from an array in Perl? I have an array in Perl:  my @my_array = ("one","two","three","two","three");   How do I remove the duplicates from the array? Why are so many forces explainable using inverse squares when space is three dimensional? Textbooks on linear regression with least squares Can you cast a spell at a higher level, even if it doesn't have an "At higher levels" entry? Many spells have "At higher levels" that provides for more targets or more damage.  For example Magic Missile can be cast as a second level spell and shoot 4 missiles instead of it's 3 as a first level spell.  Can a spell without that verbiage, such as Firestorm be cast in higher level slots for the same effect as the lower level spell? How come I never see cosmic rays in steam like they appear in a cloud chamber? Render scene with background jpg in python Fairly new to python and blender, so apologies if this is super basic. I've searched around and haven't found an answer.  I'd like to render some procedurally generated objects with a background image. In case it makes a difference, I'm using:    I don't need any interaction between the generated object and the background image so I've left a skeleton script I'm using to render below  import os DIR ="/home/path/to/folder" bg_file = os.path.join(DIR, "myimage.jpg") bg_img = bpy.data.images.load(bg_file) bpy.data.scenes['Scene'].render.filepath = os.path.join(DIR, "image") bpy.context.scene.camera = bpy.data.objects['Camera'] bpy.ops.render.render(write_still=True)   I managed to find some scripts that seem to be trying to do what I want online, but none that I could get to work. e.g.  import bpy filepath = "/home/path/to/folder" img = bpy.data.images.load(filepath)  for area in bpy.context.screen.areas:     if area.type == 'VIEW_3D':         space_data = area.spaces.active         bg = space_data.background_images.new()         bg.image = img         break  cam = bpy.data.cameras.new("Camera") cam_ob = bpy.data.objects.new("Camera", cam) bpy.context.scene.camera = cam_ob bpy.context.scene.objects.link(cam_ob) bpy.context.scene.objects.active = bpy.context.scene.objects["Camera"]   Any thoughts/tips would be greatly appreciated! Prove that the equation $x^2-y^2 = 2002$ has no integer solution Over the years I have seen a few people transport a dog on a bike.  What options have you seen?   Please include a photo in your answer if possible. How are Wolverine's claws still in his body? Everyone knows that Wolverine's adamantium claws are super-sharp — sharper than even a razor — and virtually indestructible. What puzzled me the first time I saw Wolverine is: how do the claws stay in his body?  As it is shown, Wolverine's flesh and skin are human in strength, but the healing factor makes it superhumanly durable and strong. Still, when Wolverine slashes something, or someone, extremely hard, dense, or thick (as he has to use great amount of force), the claws don't tear through his hand and leave his hand through the opposite side of the palm (because of the action having equal and opposite reaction). Tips to extend battery life for laptops and notebooks