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.

Centering text on a image

Go down

Centering text on a image

Post by angel_of_night on 10/5/2012, 00:59

Hello.
Is there any HTML code that centers the text like this:



I saw some forums doing this, but not sure about this one.
Thank you
avatar
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

Re: Centering text on a image

Post by Guest on 10/5/2012, 06:11

Hi!

If tht's text, add to CSS Stylesheet:
Code:
a.mainmenu[href="/profile?mode=editprofile"]{
  position: relative;
  bottom: 5px;
}

a.mainmenu[href="/profile?mode=editprofile"] img{
  position: relative;
  top: 10px;
}
The first code move the text from bottom to top with 5px;
The second code move the image from top to bottom with 10px.
So please edit your values so how will be better.

Guest
Guest


Back to top Go down

Re: Centering text on a image

Post by angel_of_night on 10/5/2012, 06:17

Coddy wrote:Hi!

If tht's text, add to CSS Stylesheet:
Code:
a.mainmenu[href="/profile?mode=editprofile"]{
  position: relative;
  bottom: 5px;
}

a.mainmenu[href="/profile?mode=editprofile"] img{
  position: relative;
  top: 10px;
}
The first code move the text from bottom to top with 5px;
The second code move the image from top to bottom with 10px.
So please edit your values so how will be better.

Sorry.. I didn't really understand Confused
Can you give a real example?
avatar
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

Re: Centering text on a image

Post by Guest on 10/5/2012, 06:20

I thought to something else:
Code:
a.mainmenu[href="/profile?mode=editprofile"]{
  position: relative;
  bottom: 5px;
}

a.mainmenu[href="/profile?mode=editprofile"] img{
  position: relative;
  bottom: 0px !important;
}
Just add this code into CSS Stylesheet.

Guest
Guest


Back to top Go down

Re: Centering text on a image

Post by angel_of_night on 10/5/2012, 06:27

Doesn't work. I want a HTML to work on topics only.
avatar
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

Re: Centering text on a image

Post by LGforum on 10/5/2012, 23:37

You need to use the CSS property 'line-height' Wink
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Centering text on a image

Post by angel_of_night on 12/5/2012, 00:30

@LGforum wrote:You need to use the CSS property 'line-height' Wink
Sorry I didn't understand...
avatar
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

Back to top Go down

Back to top


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