javascript - How to center a span inside a TD? -


i have problem tag, grabbed external source. code see taken website, , see date (ex. 15 juli måndag) there dates on page, how center them css? tried absolute positioning, leads have dates on each other.

fiddle here.

my html:

    <div id="header">     <div class="schema">         <h1>schema</h1>     </div>     <div class="back"><a id="back" href="index.html"></a>     </div> </div> <div id="content">     <div class="content" style="margin-top:0px;">         <div class="article" style="text-align:center;">             <!-- här skrivs det ut en massa saker -->         </div>     </div> </div> 

my js:

$(window).load(function () { //fade     $("#status").fadeout();     $("#preloader").delay(350).fadeout("slow"); }) grabshedule();  function grabshedule() {     var url = "http://1life.se/scraper/schedule.php"; //url     $.getjson(url, function (response) {         var html = response.scraped[0].html; //answer         $('.article').append(html); //answer appended .article     }); } 

check out fiddle, don't know how approach problem...

how want it: final

you can solve css , see here: http://jsfiddle.net/smysu/6/
tricky workaround , works:

td[valign="top"] {     display: block; }  td[valign="top"][style="width: 15%"] {     white-space: nowrap;     display: table-cell; } 

Comments