Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8017049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:43:27+00:00 2026-06-04T20:43:27+00:00

I have used the following tutorial to make a text block over an image:

  • 0

I have used the following tutorial to make a text block over an image: http://css-tricks.com/text-blocks-over-image/. I found it really easy actually, and quite useful, but there is one thing I could never work with, and these are span tags.

The issue I’m having is that I want to format the second part of the text in the span to have a lower font size and have a left padding. I’ve tried including a second span and defining it in the css file, but it doesn’t really do anything, just stays where it is. I also tried extending the block until the end of the picture, but a width of 1000px on each wouldn’t work.

Here’s some pictures, as they speak a thousand words…

How it looks on mine…

enter image description here

And how I want it to look…

enter image description here

And here’s some code…

<div class="img_destination">

      <img src="<?php echo SITE_URL?>/lib/skins/gsm/images/featured_destination/gcfv.png" alt="" />

      <h2 id="featured_destination"><span>>> Explore Fuerteventura<span class='spacer'></span><span class='spacer'></span>The island of natural beauty</span></h2>

</div>

CSS…

    /* Featured Destination */

.img_destination {
   position: relative;
   width: 100%; /* for IE 6 */
}

h2#featured_destination {
   position: absolute;
   top: 355px;
   left: 0;
   width: 100%;
}

h2#featured_destination span {
   color: white;
   font: bold 28px/45px Helvetica, Sans-Serif;
   letter-spacing: -1px;
   background: rgba(00, 36, 63, 0.7);
   padding: 10px;
}

h2#featured_destination span.spacer {
   padding:0 5px;
   background: none;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:43:29+00:00Added an answer on June 4, 2026 at 8:43 pm

    Is this the effect you’re after: jsFiddle example.

    I changed the text div to:

    <h2 id="featured_destination">
        <span class="bold">>> Explore Fuerteventura</span><span class='spacer'></span><span class='spacer'></span>The island of natural beauty
    </h2>
    

    I wrapped the first chunk of text in its own span so you can style it with a bold font face while the rest of the text has a normal weight.

    And this is the CSS I modified:

    /* Featured Destination */
    .img_destination {
        position: relative;
        width: 100%;
    /* for IE 6 */
    }
    
    h2#featured_destination {
        position: absolute;
        top: 355px;
        left: 0;
        width: 100%;
        background: rgba(00,36,63,0.7);
        font: 28px/45px Helvetica, Sans-Serif;
        color: #FFF;
        letter-spacing: -1px;
    }
    
    h2#featured_destination span {
        padding: 10px;
    }
    
    h2#featured_destination span.spacer {
        padding: 0 5px;
        background: none;
    }
    
    .bold {
        font-weight: 700;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this tutorial on Flash Pro CS4: http://www.baycongroup.com/flashCS4/09_flashCS4.html I have a button. I
I've been following this tutorial, which is great btw, and have one question. http://www.larryullman.com/2010/01/07/custom-authentication-using-the-yii-framework/
I used the following tutorial to make a parallax content slider for my webiste:
I have used the following tutorial for my project . I need to add
Hope someone can help me. I have used the following tutorial as a guide
Hi I have used the following tutorial to send email from my application :
I've used a tutorial ( http://support.microsoft.com/kb/317535 ) to create a VB.NET Class that exports
i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I have used following code to create a simple PDF file. It executes fine
I have used the following as comments in my .emacs // {{{ // }}}

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.