By fuzzy_texan on
I have avatars set to appear in comments and nodes. However they appear on the first line, and the text appears below them. How can I get the avatars to appear on the left of the first line - and the text for the comment or node appear to the right of the avatar? groups.drupal.org has it set up this way.
I'm using the aurora theme if that matters. I'm not a coder and hope there is a solution to this that may only require some lines to be modified in my css files.
Comments
i don't use the aurora
i don't use the aurora theme, but if you post the html source and css here, i can probably point you in the right direction.
megg, below is the
megg, below is the style.css. The html source would be fairly long too - let me know if you definitely need that as well to be able to help and I'll post that as well.
style.css
just a little bit of html
i'll still need to see the html, i'm afraid, but you don't have to post the whole thing, just the bit with the user image and the comment and a few lines above and below...
html
For the page
snip...
And now for the comments
half way there...
stick this at the bottom of your stylesheet (quick + dirty), or add it to the existing styles (better).
let me explain:
the first style clears the "floating" that's going on inside the .comment div.
the second style is where all the floating is defined, for the picture div, the meta div and the content div.
the next two styles define widths to the divs so that they can float next to each other. if they were all left at 100%, they would expand to the width of their container and therefore not leave any room to float next to each other. now, i don't know how wide the container div is - maybe it's liquid, and doesn't have a fixed width, even. so you'll have to play around with these widths. you can even make them fixed if you like.
you could apply the same css to the first bit of html you posted as well (instead of .comment, put .node), but then it's going to mess up stuff in the rest of your site because it will apply to all divs with classname 'node'. so you'll have to find a way of giving that node another classname. if you can get the html for that node to print out the classname class="node comment" (note the space), the above styles should work for it as well!
Thanks
Thanks Megg. That's a great help. That's got me a lot closer. There's still a bit I want to do to pretty it up, including subject line appear above the text rather than above the image and the text. But thanks - thats a great start.
(No subject)
Try this...
add the following code to your style.css
Close...
Thanks a lot for your help. It's very close, but the user post info is still below the avatar, with the regular text starting to the left. I'm looking for getting the user post info on the right of the picture on the first line, then the text below that (but still starting to the right of the avatar).
Very close... Wish I understood this so I could be of more use.
Did you figure this out?
Hi There
It would be a great help if you have figured this out to paste the code :)
Thanks
I think this is what you're after:
The two files that need to be edited are style.css and comment.tpl.php (which should be in the themes/aurora folder)
First the code in the comment.tpl.php file should be:
Its the same as it was before, just re-arranged a little so that the comment title will appear alongside the picture.
Second, forget the css code megg told you to put at the bottom of style.css. Put this instead:
probably a good idea to backup those two files before you go messing with them, just in case.