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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:30:21+00:00 2026-06-15T09:30:21+00:00

I’m implementing the 960 grid system on my pre-existing site. I’m using a jQuery

  • 0

I’m implementing the 960 grid system on my pre-existing site. I’m using a jQuery theme which means that every div that has content is assigned the class ui-widget-content which, as part of the theme, gives it a 1px border. I like this border design since my content divs are white, while my site’s background is off white – giving it a nice visual contrast.

The problem I have, however, is that with these 1px borders, I can’t fit divs horizontally since they are too big. For example, if I do this:

<div class="grid_16 alpha omega">
  <div class="grid_10 alpha ui-widget-content">
    <div class="grid_5 alpha">some stuf...</div>
    <div class="grid_5 omega">some stuf...</div>
  </div>
  <div class="grid_6 omega">
    more stuf...
  </div>
</div>

This results in the grid_10 div being too big by 2 pixels and thus, hanging out the end of the grid_16 div on the far right. I thought I would fix this by creating a new class like so:

.border-fix {
    border-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box; }

and then adding that to the grid_10 div, like so:

<div class="grid_16 alpha omega">
  <div class="grid_10 alpha ui-widget-content border-fix">
    <div class="grid_5 alpha">some stuf...</div>
    <div class="grid_5 omega">some stuf...</div>
  </div>
  <div class="grid_6 omega">
    more stuf...
  </div>
</div>

Now, however, my two inner grid_5 divs are being squeezed so that they now sit on top of each other, not side by side since there isn’t enough room horizontally (since the grid_10 div is 2 pixels narrower than it should be with the borders being inside, not outside)

So how do I fix this (or is it fixable)? I like the style of having the border on the div since it separates the content from the background nicely. But, with a border, my div widths are mucked up. I prefer not to force it with an extra column, as suggested in this question.

Any magic tricks I might try?

Thanks

  • 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-15T09:30:22+00:00Added an answer on June 15, 2026 at 9:30 am

    I came up with a solution I believe works that doesn’t break the grid system, I don’t have to edit any of the div sizes to account for a border, nor do I have to add any wierd margin or padding of 1px. Perhaps this is a bit hacky, but all I did was create a new class like this:

    .border-fix {
        border: 0px;
        box-shadow: 0px 0px 3px grey;
    }
    

    and added this class to any div that I wanted to have borders. This will override the ui-widget-conent class to remove the border and adds a shadow to the box. The design of the shadow I have there says to have a 0px horizontal shift, a 0px vertical shift, and blur the shadow by 3 px. With a color of grey, this looks almost exactly like a normal border without it affecting my div widths.

    Again, I think this might be a bit of a hacky way of doing things, but it seems cunningly clever, if I don’t say so myself 😛

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace

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.