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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:47:26+00:00 2026-06-07T20:47:26+00:00

I have been working on a site that requires cross browser compatibility (including earlier

  • 0

I have been working on a site that requires cross browser compatibility (including earlier IEs) and I have a sidebar that uses gradients but it turned out that it is about a million times easier to use a set background image, I have the height of the image repeating properly by taking the height of it based off the main container but I want to do the same the width of it.

I am aware of how to stretch the div based on the size of others but I want to know how I can have a conditional statement that will repeat the image y until the end of the div so it doesn’t just move the set image!

I am achieving the height based repeating using this:

<script type="text/javascript">

var theHeight = $('#Container').height() - 260;
$('#SecondaryContent').css('min-height', theHeight);


</script>

I am attempting to use this code:

<script type="text/javascript">

var divWidth = $('#SecondaryContent').width() + 1;


if (divWidth.width() > 200) {
    alert('hello');
 $('#SecondaryContent').css('background', 'url(../images/background_slice.png)', 'repeat-x 18% 0%');
}


</script>

However it seems unable to find anything within the div.

  • 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-07T20:47:29+00:00Added an answer on June 7, 2026 at 8:47 pm

    Just thought I would update that I managed to get this working using this:

    <script type="text/javascript">
    
    $(document).ready(function () {
        divExpander();
        divLineExpander();
        divWindowLineExpander();
    })
    
    function divExpander() {
        var theHeight = $('#Container').height() - 260;
    $('#SecondaryContent').css('min-height', theHeight);
    }
    
        function divLineExpander() {
            var theWidth = $('#SecondaryContent').width() + 2;
            $('#Navigation').css('min-width', theWidth);
        }
    
    $(window).bind("resize", divWindowLineExpander);
    function divWindowLineExpander(e) {
        var theLineWidth = $('#SecondaryContent').width() + 1;
        $('#Navigation').css('min-width', theLineWidth);
        }
    
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a site that relies heavily on images, and so
I have a wordpress site that i've been working on that has some pages
I have been working on a site that makes some pretty big use of
I have a site that has been working fine for months. This morning I
I have developed a taxonomy for a site that I've been working on that
I have been working on a site for about a week now and we
I have been working on building my first CSS site using divs and am
I am working on this site: beta.us.lt And I have been playing with firebug
I have an enquiry form on a site, which has been working for a
So I have been working on a site (http://getcours.tk/), recently, It works fine in

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.