The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Selector for Post Image

View previous topic View next topic Go down

Solved Selector for Post Image

Post by Ace 1 on September 30th 2015, 5:39 am

I tried using this selector to define a postprofile's image size and it affects all images on the users postprfile, inclucding pm pictures,etc.

Code:
.postprofile img { height: 100px; width: 100px }

it doesnt wrok..


Last edited by Ace 1 on October 3rd 2015, 12:41 am; edited 3 times in total

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by SLGray on September 30th 2015, 5:42 am

What exactly was you trying to change?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35613
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Selector for Post Image

Post by Ace 1 on September 30th 2015, 7:12 am

i want to make a users avatar image circular and adefined size when they create a post.

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ange Tuteur on September 30th 2015, 1:56 pm

Hi @Ace 1

Use this selector :
Code:
.postprofile dt img

.postprofile >>> User post profile
dt >>> Content container for username and avatar
img >>> image(s) inside the aforementioned container

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ace 1 on October 1st 2015, 2:03 am

Is there a way to define height and width with the same code?

Like
Code:
.postprofile dt img { size: width x height }

??

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ange Tuteur on October 1st 2015, 11:00 am

Use the width and height properties to define exact static values. You can also use max-height and max-width to define maximum values. The max- prefix only takes effect when the element exceeds the specified values. Of course there's also min-width and min-height for minimum values.

Example :
Code:
.postprofile dt img {
  width:100px;
  height:100px;
}

The rule above sets the height and width of the avatar to 100px. If we change this to max :
Code:
.postprofile dt img {
  max-width:100px;
  max-height:100px;
}

Avatars less than the max values remain the same, however if they exceed the value they'll be resized down to the maximum values ( or slightly below ).

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ace 1 on October 1st 2015, 7:17 pm

Uh @ange tuteur this is off topic but with the user information on the homepage, what do I type to call a users points count?

Like how reputation is U.point_reputation...

What is it for points

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by SLGray on October 1st 2015, 11:57 pm

@Ace 1 wrote:Uh @ange tuteur this is off topic but with the user information on the homepage, what do I type to call a users points count?

Like how reputation is U.point_reputation...

What is it for points
Please start a new topic for issues/questions that are not related.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35613
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Selector for Post Image

Post by Ace 1 on October 2nd 2015, 5:57 pm

Code:
.postprofile dt img {
  height: 100px; width: 100px;
  min-height: 100px; min-width: 100px;
  max-height: 100px; max-width: 100px;
  border-radius: 250px;
}
Thanks lol.

For some reason Even tho I made min max and regular HxW all 100px, the user profile imgs aren't circular...

More of an eclipse... http://pb2genocide.forumotion.com/t28-who-we-are-and-where-we-stand-in-the-pb2-community

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ange Tuteur on October 2nd 2015, 7:04 pm

Do you have a rule like this in your stylesheet ?
Code:
.postprofile img {
  padding-bottom: 10px;
}

That's adding padding below the image, it's what's giving it an odd circular shape. If you're adding spacing I'd change padding to margin.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by Ace 1 on October 3rd 2015, 12:40 am

Omg the stuff u think of always works

Thanka

Ace 1
Forumember

Male Posts : 689
Reputation : 38
Language : my css ready java yo scripts boi
Location : Druid Hill Park smoking indo

http://genocideclan.forumotion.com

Back to top Go down

Solved Re: Selector for Post Image

Post by SLGray on October 3rd 2015, 3:41 am

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35613
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum