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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:16:09+00:00 2026-06-18T12:16:09+00:00

I’m trying to accomplish something as simple as putting to div’s side by side.

  • 0

I’m trying to accomplish something as simple as putting to div’s side by side. The thing is I’m very capable in CSS, however the solutions I’m trying to use do not work as intended, here is the problem.

I’ved used: (so both divs is laying side by side)

display: block;
float: left;
margin-right: 15px;

And it work flawlessly LOCALLY, the thing is I’m creating this as a template solution which the html & css are being build into a system and after that will be generated to a javascript tag. The javascript tag will then be thrown into different websites and therefore, it’s very important it acts alike in all browsers.

Then i tryed position the div (the one laying on the side) to: absolute and using left to position it on the side… That don’t work either because its absolute to where the tag is implemented, meaning it would show up different places depending which site the tag is implemented.

So my question is, is there a way i can use either css or javascript so my divs are side by side no matter where i implement the tag?

Below is my code:

HTML:

<!DOCTYPE html>
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Sidekick</title>     
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="scripts/sidekick.js"></script>      
    <link href="css/style.css" rel="stylesheet" type="text/css">    
    </head>
        <body>  
        <div class="eas_sidekick_divs">     
            <div id="eas_sidekick">
                <div class="eas_sidekick_open">x</div>
            </div>
            <div id="eas_sidekick_container"></div>             
        </div>  
    </body>
</html>

CSS:

.eas_sidekick_divs div
{
    display: block;
    float: left;
    margin-right:15px;  
}

#eas_sidekick
{
    width:300px;
    height:600px;
    background: #ccc;
}

#eas_sidekick_container
{   
    width: 850px;
    height:600px;
    background: #ccc;           
}

This solution works locally as said, but not after i generate this to a tag. You can see the example here:
http://yoursource.eu/stuff/Templates/sidekick/300×250/javascript.html

Look in the different browsers like: IE & Chrome and see the difference and how weird it acts.

Click on the button of the little banner to the right stating: “exiting me” and you’ll see the div expand, the expanded div is the one i want to position to right at all times.

Hope u can help me out! 🙂

  • 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-18T12:16:10+00:00Added an answer on June 18, 2026 at 12:16 pm

    I’ve figured out myself a javascript solution for fixing my issue.

    I’ve used position absolute to fix it in all browsers and then created a javascript that depending on the width of the site, it position itself always 10 pixels to the right of my container.

    Below is my code:

    $(document).ready(function() {
    
        var cssWidth = 1024;
        var cssPos = 10;
    
        $("#eas_sidekick_container").hide();
        $("#eas_sidekick_container").css(
        {
            width: '0px',
            position: 'absolute',
            top: '0px',
            left: cssWidth + cssPos
        });
    
     $(".eas_sidekick_open").click(
                function() {
                    $("#eas_sidekick_container").show();
                $("#eas_sidekick_container").animate({
                    width: '850px'              
                });
                $('html, body').animate({
                    scrollLeft: '850'
                });
        });
    
     $(".eas_sidekick_close").click(
                function() {
                    $("#eas_sidekick_container").animate({
                width: '0px'
                });
                setTimeout( function(){
                    $("#eas_sidekick_container").css(
                        'display' , 'none' 
                    );
                }, 350);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am confused How to use looping for Json response Array in another Array.
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a

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.