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 8138285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:26:40+00:00 2026-06-06T11:26:40+00:00

Okay so I’m using Mosaic (a jQuery plugin for hover text, etc.) Anyways, I’ve

  • 0

Okay so I’m using Mosaic (a jQuery plugin for hover text, etc.) Anyways, I’ve got that working but now my problem is text aligning properly to what I’m trying to do. I’m trying to get the the words: “sale items” to appear on top of each other with very little space. However, if I use a line break “br/” it leaves a large gap in the space between line. I’ve tried setting the display property to block. Setting two “p” elements as “top” and “bottom” and aligning them that way. I’m just trying to get someone who is VERY proficient with CSS to help.

Basically I’m trying to get the text to align properly.

The HTML:

<div class="mosaic-block demo" id="sale">
    <div class="mosaic-overlay">
        <h1 class="mosaic">sale items</h1><br/>
        <p><strong>get them before they're gone!</strong></p>
    </div>
    <div class="mosaic-backdrop"><img src="img/sale.png" /></div>
</div>

The CSS:

h1.mosaic {
    display: inline;
    font-family: "ONRAMP";
    margin: 0;
    padding-left: 90px;
    padding-top: 0;
    font-size: 60px;
    text-transform: capitalize;
    width: 110px;
}
.mosaic-block {
    position: absolute;
    overflow: hidden;
    width: 320px;
    height: 150px;
    left: 50%;
    top: 475px;
   -webkit-filter: grayscale(1);
}
.mosaic-block:hover {
    -webkit-filter: grayscale(0);
}
.mosaic-backdrop {
    display: none;
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
}
.mosaic-overlay {
    display :none;
    z-index: 1;
    position: absolute;
    height: 300px;
    bottom: -150px;
    color: #FFF;
    text-decoration: none;
}
.mosaic-overlay p {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: #fff;
    padding-top: 90px;
    padding-left: 30px;
}

The jQuery aspect works fine, it does it’s job. But my CSS is lacking.

  • 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-06T11:26:43+00:00Added an answer on June 6, 2026 at 11:26 am

    You’re probably looking for the CSS property line-height which I don’t see defined in your CSS so this should be easy. First force the two words on seperate lines:

    <div class="mosaic-block demo" id="sale">
        <div class="mosaic-overlay">
            <h1 class="mosaic">sale<br/> items</h1><br/>
            <p><strong>get them before they're gone!</strong></p>
        </div>
        <div class="mosaic-backdrop"><img src="img/sale.png" /></div>
    </div>
    

    Add the line-height property and asign a value, I took a guess on what might be alright on 60px font-size but since I don’t know which font, you should probably tweak it higher/lower.

    h1.mosaic {
        display: inline;
        line-height: 50px;
        font-family: "ONRAMP";
        margin: 0;
        padding-left: 90px;
        padding-top: 0;
        font-size: 60px;
        text-transform: capitalize;
        width: 110px;
    }
    

    If the text is being clipped by the box you can add padding to the top/bottom if necessary to get the look you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I´m working on a website right now that shows information about parts of
Okay, so I know that using eval() isn't great, but I haven't been able
Okay, I am using a custom tab bar (not a tab based app) but
Okay, I have hundreds of .net controls with text attributes that needs to be
Okay, so I've known about this for like 600 years now, but I've only
Okay i know i have to use the JDBC etc, but im not sure
Okay I got some good advice for Mobile Detection but still having an issue
Okay so im working on this php image upload system but for some reason
Okay im making a mobile application using jquery, and then im using phonegap to
Okay, this is a pretty weird question, but the situation is this. I've got

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.