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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:05:31+00:00 2026-05-23T08:05:31+00:00

Hi I have three questions regarding this code, http://jsfiddle.net/pJMva/125/ 1) why the div with

  • 0

Hi I have three questions regarding this code,

http://jsfiddle.net/pJMva/125/

1) why the div with black background not covering the div with red background?[done]

2)why is the text going outside the div its contained in?[done]

3) how do I make the image and text in the third div center and vertically middle aligned[couldnt find an answer for vertical alignment]

4) how do I make the black background cover 100% width as well as height …. width: 100% works but height: 100% doesnt?

  • 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-05-23T08:05:31+00:00Added an answer on May 23, 2026 at 8:05 am

    1) why the div with black background
    not covering the div with red
    background?

    Because you haven’t cleared your floats. One way to clear your floats is to add overflow: hidden to #black.

    See: http://jsfiddle.net/pJMva/108/ (I made your text white for visibility)

    A good article to explain floats: http://coding.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/

    2)why is the text going outside the
    div its contained in?

    The div is not wide enough to contain the text (assuming that your window is reasonably narrow). You can force the text to wrap by adding word-wrap: break-word to #fl_dv.

    See: http://jsfiddle.net/pJMva/109/

    3) how do I make the image and text in
    the third div center and vertically
    middle aligned

    As suggested by @faraz, see: http://css-tricks.com/vertically-center-multi-lined-text/

    Something like: http://jsfiddle.net/pJMva/127/

    4) how do I make the black background
    cover 100% width as well as height
    …. width: 100% works but height:
    100% doesnt?

    You need to set height: 100% on all parent elements of #black to make height: 100% work:

    html, body {
        height: 100%
    }
    

    http://jsfiddle.net/pJMva/128/

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

Sidebar

Related Questions

There have been some similar questions asked regarding Grid views, but none have been
I have three easy questions. Does anybody use QuickTest Pro for automated testing? Any
I know there have been questions in the past about SQL 2005 versus Lucene.NET
As per the title I have three parts to this question... Is db4o object
There have been some questions about whether or not JavaScript is an object-oriented language.
There have been a couple of questions that sort of dealt with this but
Currently I'm using the Java mail library at http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_(no_Intents)_in_Android to accomplish this; however I
I have a question regarding JavaScript and methods by which its code can be
This questions is related to this thread regarding the use of XML combinator which
I have the following code from apache's svn. As you can see this is

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.