The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How might I add text on an image?
masonh928
post Jun 13 2016, 10:13 PM
Post #1


Serious Coder
*****

Group: Members
Posts: 253
Joined: 17-August 13
From: Indiana
Member No.: 19,570



So I'm designing a bakery template and I'd like to have the main "Call to Action" buttons be animated cupcakes that have text.

wub.gif
(())
((())))
(((())))))
(((((()))))))
(((((((())))))))
(((((((()))))))))))
^^^^^^^^^
^ Text Here ^
^ _______^
^ ______^
^_____^
^___^

That's my cupcake button with text lol tongue.gif

What's a simple yet effective way of doing this, I'm trying to make it flexible, so I'm trying to avoid 'position'.

This post has been edited by masonh928: Jun 13 2016, 10:16 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jun 14 2016, 07:51 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



See 'Using CSS to overlay text on an image' here. But, you will need to use position. The page also shows other ways. Or, see here.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Jun 14 2016, 11:16 AM
Post #3


Serious Coder
*****

Group: Members
Posts: 253
Joined: 17-August 13
From: Indiana
Member No.: 19,570



If I do use position, will that disrupt the layout for mobile devices ?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Jun 14 2016, 11:33 AM
Post #4


Serious Coder
*****

Group: Members
Posts: 253
Joined: 17-August 13
From: Indiana
Member No.: 19,570



This helped me and thanks charles:

http://stackoverflow.com/questions/8708945...an-image-in-css

But will it disrupt the layout on smaller screens ?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jun 14 2016, 11:33 AM
Post #5


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



To be honest, I don't know. I don't use any mobile device at all. I guess you could put together a small test page to find out for sure.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Jun 14 2016, 11:38 AM
Post #6


Serious Coder
*****

Group: Members
Posts: 253
Joined: 17-August 13
From: Indiana
Member No.: 19,570



Since my screen is so big, I just make the window smaller to simulate a mobile device.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jun 14 2016, 11:41 AM
Post #7


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Well, I do that also for testing. But I've never made a page with an image and text over it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
masonh928
post Jun 14 2016, 11:42 AM
Post #8


Serious Coder
*****

Group: Members
Posts: 253
Joined: 17-August 13
From: Indiana
Member No.: 19,570



Yeah, thanks again... Helpful as always.

I don't believe it would since it's within a separate container within the image.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jun 15 2016, 04:32 AM
Post #9


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



I never surf or test on a mobile phone device, but there are online simulators. Search for "online mobile test of website" or "mobile emulator testing" or similar.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:34 PM