News:

Wondering if this will always be free?  See why free is better.

Main Menu

Hiding the avatar just on board index?

Started by elf_fu, August 14, 2014, 11:46:11 AM

Previous topic - Next topic

elf_fu

Hi there!

I run a website that's RP related, and as such, I allow members to use pretty huge mc-large URL linked avatars (200 wide by 300 tall).  I don't mind the huge avatars--but I do mind the way it looks on my forum index.

I was wondering if there was any way I could either: code it to display much smaller, or, hide it entirely without removing the Show Unread Posts since last visit/etc. If I could hide it with a bit of CSS or removal of something, also where would I find it?

Thank you! 


GR

Arantor

You might use something like the following in your theme's index.css file (assuming it is similar to the standard theme's code, hard to tell without knowing the theme)

#upper_section img.avatar {
   max-height: 100px;
}


Or even hide it completely with something like:

#upper_section img.avatar {
   display:none;
}

elf_fu

Ahh! Sorry, my site in question is here: gr.2phatgeeks.com.

Your suggestion made me look a little harder at my css and I've tinkered (but without knowing what I'm doing.)

I ended up with this:



/* the avatar, located to the left */
#user_section
{
   padding: 0.7em;
   border-right: 1px solid #1E1E1E;
   margin: 0 0.5em 0 0;
   float: left;
}


#myavatar, img.avatar {
   max-height: 100px;
}


Which was originally this:



/* the avatar, located to the left */
#user_section #myavatar
{
   padding: 0.7em;
   border-right: 1px solid #1E1E1E;
   margin: 0 0.5em 0 0;
   float: left;
}



My first awful chop did shrink the avatar image on the front page, it also shrinks all the avatars. OOps?  I'm not sure what controls that particular avatar display/what to put. I did try the #upper_section you suggested, but it didn't change anything.

GR

Arantor

-sigh- The code I gave you controls that specific avatar.

img.avatar targets all of them. You want the img.avatar only inside #upper_section. If you did anything other than what I posted, you did it wrong (because the code I posted is specifically #upper_section with any child img tags with an avatar class)

elf_fu

There is no upper section in the index.css for my theme.


And please don't be condescending to newbs, really. I didn't come here for help because I knew what I was doing. :'(


Edit: And adding either did not work.

GR

Arantor

I wasn't asking you to edit anything. I was asking you to add that to your theme.

And if you don't want people to be condescending, if you are not clear on what is meant, please ask if you are unsure rather than assuming (and as shown, getting it wrong)

elf_fu

Neither code worked. Which is why I tried tinkering.

GR

Arantor

It might have been nice if you'd said that.

#upper_section is how the standard theme does it. I don't know how your theme does it, sorry.

elf_fu

Well I guess that left us both assuming. Thank you for trying to help!

GR

Hj Ahmad Rasyid Hj Ismail

Add the given code by Arantor at the end of your index.css file and change #upper_section to #user_section as how it goes. So far that I am concern the given code is correct except from my visit to your site, it might be using the later and not the former as an id to that area.

elf_fu

Thank you!

I finally got it to work by using:



#user_section  #myavatar img
{ max-height: 100px; width: auto; }

GR

Advertisement: