How to align the bottom of two left- and right aligned texts with bottom of parent container?
Tags: html,css
Problem :
Imagine you have this:
<div class="parent_with_height200px">
<div class="left">This is the left floated text, size 12px</div>
<div class="right">This is the right floated text, size 40px</div>
</div>
How can I make the two texts "stand" on the bottom of the parent div having their baseline aligned with each other?
It's perfectly ok to change the css/html, it's the result I want.
Solution :
As feeela says, using position is how you will accomplish this.
.parent_with_height200px {
height: 200px;
position: relative;
background-color: #DDDDDD;
}
.left {
width: 50%;
position: absolute;
bottom: 0px;
left: 0px;
background-color: #999999;
}
.right {
width: 50%;
position: absolute;
bottom: 0px;
right: 0px;
background: #444444;
}
See the output here: Example
CSS Howto..
I have done this with CSS but there are several many ways. You can call edit or delete functions by adding a click event on <i> tag with an appropriate...
Seems like you need to set an height in .parent, .image and finally to img to trigger the calculation for each elements : https://jsfiddle.net/knjesznx/4/ You should not mind the flex...
Unfortunately, it's almost impossible to do as far as generated in a such way content exists only in the layout of the Web document. There were already simmilar questions with...
Have a look at jQuery UI's Resizable.
Look ma', no hands scripts! CSS only solution .content { text-indent: -1000em; } .content * { text-indent: 0; } /* This one's pure cherry on top ;) */ /* Remove...
You can experiment with text-shadow property (MDN doc), for instance: text-shadow: white 0px 0px 10px; (jsFiddle) It's supported in IE10. For IE9, you can use proprietary Internet Explorer filters as...
HTML <div id='mydiv' > <img id='myimage' src="http://placekitten.com/200/385" /> <canvas id ='mycanvas' width="200" height="100" /> </div> CSS div#mydiv{ position: relative; } #myimage{ position: relative; } #mycanvas{ position: absolute; top: 0; left:...
You can put this CSS on #carousel_ul left: 50%; margin-left: -1200px; Just make sure it goes left to right. The only problem is if someone has a monitor wider than...
jQuery (javascript) Method - Best for compatibility. In the example below the first nth-child filter selects every 4th item starting from the 1st. Then it filters every 4th item starting...
This is what you need. Some sites have their own media print so you need to add -webkit-print-color-adjust: exact; to your media print and !important it to make sure it...
You can directly use css selector for table, tr, td, tbody and apply required style. Because ultimately that renders as <table> <tr> <td> .. Following are some of examples. Use...
input[type="text"] , input[type="password"] { /*css code*/ } ...
You're using descendant selectors, which will match all children within an element. What you need are child selectors - > - which will only select direct descendants of an element....
The following article explains exactly what you are looking for - the ability to define alternative style sheets, how to switch between them, and to store that choice in a...
If you have the TextFX plugin (which comes by default) select the text you wish to fix and then follow these instructions to select the appropriate TextFX function from the...
It should work if you change the foreach loop to this one: $.each(json, function(i) { imgList += '<ul><li><img class="inserted" src= " ' + json[i] + ' "></li>' + bottom; });...
This is totally a version issue. As @freejosh commented, it is resolved in latest releases of LESS. If you take your code above to http://less2css.org/ then it works fine (which...
Your div.container needs an explicit height specified. Child contents won't expand up to a max-height, just height. Something like this: http://jsfiddle.net/dpF7k/ or more simply applying directly to the textarea instead...
Try this: table.show-my-request-table tr > td:first-child { background-color: #ff0000; } ...
You can try something like this: JSFiddle Note: You should have unique ids. So to manipulate similar elements use class. You should use visibility: hidden instead of display: none. display:...
As I understand, the issue: <asp:RadioButtonList ID="rd1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Text="first"><span class="WebRupee">Rs</span><span >1000</span></asp:ListItem> <asp:ListItem Text="second"><span...
Ok is this the beahvior that you want? i added a span in td and then in css: .ng-enter span { -webkit-animation: fadeIn 2s; -moz-animation: fadeIn 2s; -ms-animation: fadeIn 2s;...
There is most definitely a simple css/html solution to this. You shouldn't need to hardcode the style with php or do math or use javascript: http://jsfiddle.net/Madmartigan/34UCn/5/ This may not be...
The issue which you are encountering - Demo And this is what will fix the issue, am doing nothing fancy, I assigned width: 100%; to the table element, and than...
For some reason, I didn't tried the simple solution.. well it's working now :) document.getElementById("input").checked...
It's better to do this with CSS .block1 > .block1-bottom { color: #FFFFFF; } .block1:hover > .block1-bottom { color: #FEB90D; } <div class='block1'> <p class='block1-top'>This is paragraph 1</p> <p class='block1-bottom'>This...
Like this: jsFiddle. Make the child div appear first as a child of childDiv2 and keep the CSS as-is.
@Jeroen had the best answer in my situation: <meta name="viewport" content="width=1030, maximum-scale=1.0" /> As Jeroen didn't submit as an answer I post it here as the answer :-) I put...
No example code, but the best I can suggest is to extract the full url in parentheses, then create an image object, set the source to that url, and then...
Try this. All the div can be expanded in any order. to switch into normal position. click on the expanded div. Here's a pen : http://codepen.io/anon/pen/mOaGPj and here's a working...