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

The Archive Base Latest Questions

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

I am having a bit of an issue here… I have a Div and

  • 0

I am having a bit of an issue here… I have a Div and its called leftSideBar and inside it has two images, a top and a bottom and this div has a repeat-y background. It did have a min-height but I used jquery to get the height of my content div like so…

$(document).ready(function() {
var div_height = $("#content").height();
$(".leftSideBar").css("height", div_height);

var div_height = $("#content").height();
$(".rightSideBar").css("height", div_height);
});

What I am trying to do is have the top image at the top of the div and the bottom image at the bottom of the div…here is the HTML…

<div class="leftSideBar">
<img src="images/leftSideTop.jpg" width="174" height="70" border="0" />
<img src="images/leftSideBottom.jpg" width="174" height="98" border="0" />
</div><!--leftSideBar-->

<div class="content" id="content"></div><!--content-->

<div class="rightSideBar">
<img src="images/rightSideTop.jpg" width="174" height="70" border="0" />
<img src="images/leftSideBottom.jpg" width="174" height="98" border="0" />
</div><!--rightSideBar-->

and the CSS

.leftSideBar{
    background:url(../images/leftSide.jpg) repeat-y;
    float:left;
    margin-top: -49px;
    width:174px;
}

.rightSideBar{
    background:url(../images/rightSide.jpg) repeat-y;
    float:right;
    margin-top: -49px;
    width:174px;
}

.content{
    background:#FFF;
    width: 992px;
    position:relative;
    min-height: 591px;
    float:left;
    margin: -48px auto 0;
    font-size:13px;
}

Any help or a point in the right direction would be awesome! 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-05-31T00:24:00+00:00Added an answer on May 31, 2026 at 12:24 am

    Since it appears you’re using static widths, you should be able to just make your IMG elements block and position: absolute and align them top/bottom.

    .img-side{
        display:block;
        position:absolute;
        left:0;
        top:0; /* we'll use top as a default*/
    }
    .img-side.bottom{
        top:auto; /* might need this, I'm not sure. */
        bottom:0;
    }
    

    for you HTML just add the classes:

    <img class="img-side" ... />
    <img class="img-side bottom" ... />
    

    If you plan on having content in your sidebars, you’ll want to add the appropriate padding to the top/bottom of the sidebar so your content doesn’t flow over your image (unless that’s the design).

    UPDATE

    One side note, you have to make your sidebars position:relative so your IMG elements use it for positioning. You might update your CSS to be a little more like this:

    .sideBar{ /* left will be default */
        background:url(../images/leftSide.jpg) repeat-y;
        float:left;
        margin-top: -49px;
        width:174px;
        position:relative;
    }
    
    .sideBar.right{
        background:url(../images/rightSide.jpg) repeat-y;
        float:right;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello fellow java developers. I'm having a bit of an issue here. I have
I'm having a strange issue here, i have this bit of code: <?php if
having a bit of an issue here. My navigation controller has a scrollview that
I am having a bit of a issue. I have an NSMutableDictionary with 10
I am having a bit of a strange issue. I have a ListView which
I'm having a bit of an issue here switching between my view controllers. I
Having a bit of an issue here. I'm creating an application in Visual Studio
I'm having a bit of an issue and, the other questions here didn't help
Having a bit of an issue accessing dynamically added DIV's immediately after they've been
I'm having a bit of an issue with duplication here, I believe I can

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.