Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2012
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    writing text over an image.

    Hello, I'm currently learning Html and Css. I'm getting on okay apart from the odd problem here and there. One problem i'm encountering right now. I have a section on my webpage which I've labelled options which is floated to the left. Within that section I also have floated from left to right 4 patterned boxes (imgs made in fireworks) with equal distance between them. I want to be able to put text within each of the boxes but cannot figure out how to do this. Could somebody please put me straight. Thankyou.

  • #2
    New Coder
    Join Date
    Feb 2012
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Am I on the right path by proposing that I should set these images as background images?

  • #3
    New Coder
    Join Date
    Feb 2012
    Posts
    25
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Hi S024201,

    Yep your correct, set the images to the background-image of the corresponding divs.

    You should then be able to add text to the div.

    Thanks,

    Scott

  • Users who have thanked ScottBaxter for this post:

    s024201 (02-07-2012)

  • #4
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,542
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Another technique you could use, depending, would be to play with positionings: give the sections the relative position css, and then a span or div within them the absolute position. By making the inner tag's z-index higher, it'll float above.

    Its admittedly a more complex technique, but can allow for some fun designs.

    I have a link to a very nice simple site that explains positioning very well at home. If you want it, I can try to find it once I get out of work.

  • #5
    New Coder
    Join Date
    Feb 2012
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts
    yes keith that would be great thankyou.

  • #6
    Regular Coder Kevin_M_Schafer's Avatar
    Join Date
    Apr 2011
    Location
    Fairfax, Minnesota, U.S.A.
    Posts
    482
    Thanks
    97
    Thanked 17 Times in 17 Posts
    Hi s024201 and all,

    Just thought I'd jump in with a link to something I threw together a couple of weeks ago. It's an image with text on top of it. Maybe it will give you an idea or two.

    http://www.theeagleextra.com/testfil...al_center.html

    --Kevin

    .
    Last edited by Kevin_M_Schafer; 02-07-2012 at 11:17 PM. Reason: text clarity
    My keyboard is an IBM from 1993 and I like it that way. | Who is Dan Well? Everyone always says I know Dan Well.Building a web page is like building a birdhouse. Put it up there and watch 'em come. | Maintaining the aspect ratio of an image is more important than having a cold orange pop.

  • Users who have thanked Kevin_M_Schafer for this post:

    s024201 (02-07-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •