The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Centering text on a image

2 posters

Go down

Centering text on a image Empty Centering text on a image

Post by angel_of_night May 10th 2012, 12:59 am

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

Centering text on a image Doubt

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

Female Posts : 565
Reputation : 10
Language : portuguese

View user profile

Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by Guest May 10th 2012, 6:11 am

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.
avatar
Guest
Guest


Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by angel_of_night May 10th 2012, 6:17 am

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?
angel_of_night
angel_of_night
Forumember

Female Posts : 565
Reputation : 10
Language : portuguese

View user profile

Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by Guest May 10th 2012, 6:20 am

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.
avatar
Guest
Guest


Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by angel_of_night May 10th 2012, 6:27 am

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

Female Posts : 565
Reputation : 10
Language : portuguese

View user profile

Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by LGforum May 10th 2012, 11:37 pm

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

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

View user profile

Back to top Go down

Centering text on a image Empty Re: Centering text on a image

Post by angel_of_night May 12th 2012, 12:30 am

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

Female Posts : 565
Reputation : 10
Language : portuguese

View user profile

Back to top Go down

Back to top

- Similar topics

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