{"id":578,"date":"2012-05-25T07:44:32","date_gmt":"2012-05-25T07:44:32","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=578"},"modified":"2012-05-25T07:44:32","modified_gmt":"2012-05-25T07:44:32","slug":"align-text-to-bottom-of-div-using-css","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/align-text-to-bottom-of-div-using-css\/","title":{"rendered":"Align text to bottom of div using CSS Example"},"content":{"rendered":"<p>Here is a neat trick to <em><strong>align the text or the content of a div to the bottom portion of the div using CSS<\/strong><\/em>.<!--more--><\/p>\n<h2>Example to Align text to bottom of div using CSS<\/h2>\n<div class=\"make_demo\">\r\n\r\n\t<form action=\"https:\/\/theextremewebdesigns.com\/blog\/wp-content\/themes\/ewd_blog_2017\/try_demo.php?post_id=578\" method=\"post\" name=\"form1\" target=\"_blank\" id=\"form1\">\r\n\r\n\r\n\t<input type=\"hidden\" name=\"shortcode_content\" id=\"shortcode_content\" value=\"\" \/>\r\n\r\n        <div class=\"try_demo_btn_container\">\r\n\r\n\r\n            <button type=\"submit\" name=\"sbt_make_demo\" id=\"sbt_make_demo\" class=\"btn-primary btn-try-demo\">\r\n                Try Demo\r\n            <\/button>\r\n\r\n\r\n        <\/div><!-- .try_demo_btn_container -->\r\n\r\n    <\/form>\r\n    <\/div>\r\n    \n<p>For the sake of example, let us assume that we have a div with ID &#8220;my_div&#8221;. This div contains another div with ID &#8220;my_div_content&#8221;. This div actually contains our text that we want to align to bottom of &#8220;my_div&#8221;. So let&#8217;s see how this can be achieved.<\/p>\n<h3>Example: Align Text to bottom of Div using CSS<\/h3>\n<pre class=\"lang:xhtml decode:true\">&lt;style type=\"text\/css\"&gt;\n#my_div { position: relative; }\n#my_div_content { position: absolute; bottom: 0; left: 0; }\n&lt;\/style&gt;\n\n&lt;div id=\"my_div\"&gt;\n\n&lt;div id=\"my_div_content\"&gt;\n&lt;h1&gt;Some title&lt;\/h1&gt;\nContent goes in here.\n&lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n<div class=\"make_demo\">\r\n\r\n\t<form action=\"https:\/\/theextremewebdesigns.com\/blog\/wp-content\/themes\/ewd_blog_2017\/try_demo.php?post_id=578\" method=\"post\" name=\"form1\" target=\"_blank\" id=\"form1\">\r\n\r\n\r\n\t<input type=\"hidden\" name=\"shortcode_content\" id=\"shortcode_content\" value=\"\" \/>\r\n\r\n        <div class=\"try_demo_btn_container\">\r\n\r\n\r\n            <button type=\"submit\" name=\"sbt_make_demo\" id=\"sbt_make_demo\" class=\"btn-primary btn-try-demo\">\r\n                Try Demo\r\n            <\/button>\r\n\r\n\r\n        <\/div><!-- .try_demo_btn_container -->\r\n\r\n    <\/form>\r\n    <\/div>\r\n    \n<h5>\u00a0That&#8217;s it!<\/h5>\n<p>Do you know of any other ways to <strong>a<\/strong><em><strong>lign text to bottom of div using CSS<\/strong><\/em>? Feel free to suggest by commenting below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a neat trick to align the text or the content of a div to the bottom portion of the div using CSS.<\/p>\n","protected":false},"author":1,"featured_media":276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18,13],"tags":[52],"class_list":["post-578","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css-tips-and-tricks","category-tips-and-tricks","tag-css-tips"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-9k","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}