Skip to content Skip to sidebar Skip to footer

Two Part Of Different Font Size Text Bottom Aligned

Pls see: Demo What I want to do is: horizontally, put the first sentence on the left, and put the other one right. Vertically, I want to align them to the bottom. The two sentenc

Solution 1:

check this Fiddle

*{
margin:0px!important;
}

You need to remove the auto generated margins. i've specified the height of your table cells to see the effect of bottom alignment

Solution 2:

Remove margin and you will get your desired output

.di_h_cnp {
   font-size: 24px;
   margin: 0;
}

as p tag has these two rules to add margin

-webkit-margin-before: 1em;
-webkit-margin-after: 1em;

Solution 3:

Solution 4:

When you write HTML you should know that most of HTML tags takes default margin and padding. To remove those margin and padding you should use one of the following techniques:

  • Use CSS Reset [recommended]

  • Use following CSS

    body, p, h1, h2, h3, h4, h5, h5, h6, form, input, blockqoute { margin: 0; padding: 0; line-height: normal; }

By using one the above techniques your HTML elements behaves same in cross browsers.

Post a Comment for "Two Part Of Different Font Size Text Bottom Aligned"