PDA

View Full Version : Date displayed on multiple lines


Raina
08-04-2016, 11:53 PM
Currently the join date is sometimes split onto multiple lines. How can I fix that?

See the attached image for details.

MarkFL
08-05-2016, 12:14 AM
Post a link to a post on your site where the date is split (wrapped) like that, and I will see if I can find a CSS fix for it. :)

Raina
08-05-2016, 12:17 AM
Sure see the 2nd post down:

Here ya go (http://www.ozgrid.com/forum/showthread.php?t=200673)

MarkFL
08-05-2016, 01:44 AM
Okay, one way is to open up your "postbit.css" template, and locate the CSS selector:

.postbit .userinfo .userinfo_extra dl, .postbit .userinfo_noavatar .userinfo_extra dl {
margin-{vb:stylevar right}: {vb:stylevar padding};
float: {vb:stylevar right};
width: 150px;
}

And change the width to a larger value like 200px, or whatever suits your preference and is wide enough to accommodate all dates.

If you would rather not hack your template (and I recommend this method), then create a plugin hooked at "parse_templates" with the code:

if (THIS_SCRIPT === 'showthread')
{
$template_hook['headinclude_css'] .= '<style>.postbit .userinfo .userinfo_extra dl, .postbit .userinfo_noavatar .userinfo_extra dl {width: 200px !important;}</style>';
}

And change the "200px" to the value you want. :)

Raina
08-05-2016, 01:48 AM
Brilliant - thanks Mark. I went for your recommended option.