How do I align something in a in the top-left corner - without aligning everything?

Tags: html,css

Problem :

Say I have something that looks like this:

How do I align the numbers in each cell to be in the top-left corner of each cell - without aligning the words?

Preferably in just HTML/CSS - but if you can't do it any of those, then jQuery is fine.

Solution :

Wrap the number in a <span>, float it to the left, and give it a negative top margin to push it up into the corner:

You'll have to fiddle with the pixel values on the .sit-in-the-corner margins to get something that works for you.

    CSS Howto..

    how to set break for print page(div) using css?

    How to change fill color of SVG on click when it's used as a background image?

    css how to only make bold fonts for first

    How to set background-image to take remaining section of the page in semantic-ui

    How to load user CSS in a WebKit WebView using PyObjC?

    How to split an HTML paragraph up into its lines of text with JavaScript

    How to create a line break instead of having text going on top of itself?

    how to add active css class to a link in Wordpress

    how to create an external javascript and an external css file for date picker and how to use it in eclipse

    How to implement geometric div backgroud shapes in css

    How to put a div at left or right in pure CSS?

    How add symbol in CSS for element?

    How to handle PNG image loading time in html, css

    CSS - how to overflow from div to full width of screen

    How to center verticaly n inline containers with different font-size?

    How to make cut off in CSS as shown in the attached image?

    How to modify HTML inside PHP by CSS [closed]

    How do I remove the gap between the header and image slider

    How to implement .SCSS on my own website? [closed]

    How to create a box with rounded corners at the top, but normal corners at the bottom?

    How to change tr color on mouse over when there is already implemented?

    (CSS) How to Shorten CSS code

    How to remove the blank between div.sons?

    How to elasticity of the char length in javascript or css? [duplicate]

    CSS - how to make the iframe inside the div center aligned and the main div also center?

    How do I implement CSS + JavaScript scripts on specific pages on our Drupal site? [closed]

    How to make a resizable menu centered on the middle?

    Writing “$('#dialog').modal('show');” as plain javascript?

    How can I have an image float next to a centered div?

    HTML5 (php) with CSS Tooltip shows up far away from hyperlink