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

  • Home
  • SEARCH
  • 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 4549598
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:22:57+00:00 2026-05-21T16:22:57+00:00

Have a look at this fiddle: http://jsfiddle.net/h4VS7/ How do I make the yellow element

  • 0

Have a look at this fiddle: http://jsfiddle.net/h4VS7/

How do I make the yellow element align (horz) with the grey background no matter how the window is resized? I refuse to believe it can’t be done with css. Yes, js hacks and Scroll Follow plugin works but lags.

Please, anyone?

Edit:

Found a solution. If the container margins are expressed as percentages the content part can be expressed as the remainder percentage. See here: http://jsfiddle.net/h4VS7/1/

Though not sure why it doesn’t align perfectly. It should I think. Could be jsfiddle margin/padding related.

  • 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-21T16:22:58+00:00Added an answer on May 21, 2026 at 4:22 pm

    It’s not particularly difficult if you don’t mind adding an extra element to wrap .top:

    http://jsfiddle.net/Ud3ZQ/


    And also, a properly aligning (well, almost) version of your solution:

    http://jsfiddle.net/h4VS7/3/

    The problem was that jsFiddle loads http://fiddle.jshell.net/css/result-light.css:

    body {background: white; padding: 10px;  }
    

    Anything is more specific than * (including body), so the padding was being applied, regardless of * {padding:0; margin:0}

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

Sidebar

Related Questions

Please take a look at this fiddle: http://jsfiddle.net/d3uc9/4/ I have a problem with this,
If you look at this fiddle: http://jsfiddle.net/kamilszokaluk/uhmYg/ I have 3 divs, the upper one
Please take a look at this fiddle: http://jsfiddle.net/hughbe/QYGcq/ As you can see, the label
I have table like this -> http://jsfiddle.net/jurisKaste/FvgeQ/ And I need to get array of
If you'll take a look at this: http://jsfiddle.net/hunterscott/JYLVQ/ You'll notice that if you try
Have a look at this very simple example WPF program: <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have a look a this simple example. I don't quite understand why o1 prints
Please have a look at this form that I am trying to design with
Please have a look at this page www.pixeli.ca/issue. I have begun making a page

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.