How to align text in the center of an element without considering floated elements

qchrisfarbvzp

New Member
Ok i got this markup\[code\]<th class="ai1ec-weekday <?php if( $day['today'] ) echo 'ai1ec-today' ?>"> <span class="ai1ec-weekday-date"><?php echo Ai1ec_Time_Utility::date_i18n( 'l', $date, true ); ?> </span></th>\[/code\]which produces this output as the span has \[code\]text-align: center\[/code\]
8ypFB.png
now i want to add a button which is floated to the right\[code\]<th class="ai1ec-weekday <?php if( $day['today'] ) echo 'ai1ec-today' ?>"> <div class="btn-group pull-right"> <button class="btn ai1ec-reveal-events"><?php _e( 'Reveal all events', AI1EC_PLUGIN_NAME ) ?></button> </div> <span class="ai1ec-weekday-date"><?php echo Ai1ec_Time_Utility::date_i18n( 'l', $date, true ); ?> </span></th>\[/code\]and this is what i get
sJp8i.png
what i would like to obtain is that mondais still centered as it was before, but i would like to do that without using absolute positioning (if it's possible, of course)the CSS ( i mean other than bootstrap CSS )\[code\].ai1ec-week-view th .ai1ec-weekday-date,.ai1ec-oneday-view th .ai1ec-weekday-date { font-size: 10.5pt !important; font-weight: normal !important;}.ai1ec-week-view th .ai1ec-weekday-day { font-size: 9pt !important; font-weight: normal !important;}.ai1ec-month-view th, .ai1ec-oneday-view th { text-align: center !important;}\[/code\]
 
Back
Top