View Full Version : styling comments li ?
Kenneth K
06-10-2005, 09:52 AM
In my never ending urge to perfect my design I would like to style the last line in the comments. You know the name-link (got that) but also the '@ date'. I tried looking in the main php but I have no luck in spotting anything in there. So where do I look?
Kenneth :?
Connie
06-10-2005, 08:11 PM
Kenneth,
as I explained very often already, it is very easy to identify the CSS-elements of a page with Firefox and the webdeveloper extension
1) open the comment-page in Firefox
2) CSS / View Style Information
3) go with the cursor to the part of the web page which you want to identify
4) in the status line you see: ..... div comments > ul >li
5) so you know that the the comment is formatted by a LI-element (listing element)
but: this shows that the last line has the same formatting as the complete comment
so you have no direct access to the last line
I do not recomment you now to go into the script which produces the comments, as any moderation there will be subject to further updates ;=)
so there is no direct way to format it via template + CSS
Kenneth K
06-10-2005, 08:32 PM
but: this shows that the last line has the same formatting as the complete comment
so you have no direct access to the last line
Yes exactly, that's what I want to change. I was hoping that someboby could go in and make that last line a element so it can be styled. It's a flaw IMO that you can't change it.
Kenneth
Joe[y]
06-10-2005, 08:48 PM
i'll look into this. there's no reason why users shouldn't have the ablity to change it.
Connie
06-10-2005, 08:50 PM
the last line should be set into a <span...> when the last line is produced in index.php ...
there is no way to say with CSS " please format only the last line of a list-element" unfortunately
Joe[y]
06-10-2005, 09:04 PM
in includes/functions.php change
$image_comments .= "<li>$comment_message<br />$comment_name @ $comment_datetime</li>";
to
$image_comments .= "<li>$comment_message<br /><span id='commentinfo'>$comment_name @ $comment_datetime</span></li>";
and then in your stylesheet you can use #image info {whatever} to style that line.
phunk
06-10-2005, 09:15 PM
same wish here.
i found after long time searching the following in functions.php
line 24
$image_comments .= "<li>$comment_message<br />$comment_name @ $comment_datetime</li>";
this should get you where you want :)
edit: *bummer* a few mins too late! :(
Kenneth K
06-10-2005, 09:31 PM
Thanks again Joe[y] :D I never looked in includes/functions.php
Did I mention I love this forum? :lol:
Kenneth
derevaun
06-10-2005, 09:47 PM
I think I changed mine to this:
$image_comments .= " <dt>$comment_name ($comment_datetime)</dt>\n <dd>$comment_message</dd>";
...and used a parent selector in the dt and dd rules to format it visually. Seems more semantic this way, and you get separate (instead of nested) elements. Potaytoe potahtoe :wink:
Joe[y]
06-10-2005, 09:49 PM
I think I changed mine to this:
$image_comments .= " <dt>$comment_name ($comment_datetime)</dt>\n <dd>$comment_message</dd>";
...and used a parent selector in the dt and dd rules to format it visually. Seems more semantic this way, and you get separate (instead of nested) elements. Potaytoe potahtoe :wink:
i'd agree with this too.... but most users wouldn't care about semantics.. just simplicity.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.