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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:54:37+00:00 2026-06-17T03:54:37+00:00

I have two div elements as shown below. First one exists when the page

  • 0

I have two div elements as shown below. First one exists when the page loads, the second one gets added from jQuery.

Live preview – http://jsfiddle.net/emaillenin/dhtgX/1/ (Try checking out this in Firefox and Chrome)

<div class="krc_item">
  <span>
    <img class="cart_pimg ui-draggable" src="xxx">
  </span>
  <div id="krc_item_qty_763" class="krc_item_qty">
    1
  </div>
</div>
<div class="krc_item">
  <span>
    <img class="cart_pimg ui-draggable" src="xxxx">
  </span>
  <div id="krc_item_qty_918" class="krc_item_qty">
    1
  </div>
</div>

The following are the relevant CSS:

.krc_item {
 float: right;
 padding-top: 3px;
 width: 70px;
}

img.cart_pimg {
 width: 50px;
 height: 50px;
}

.krc_item_qty {
 height: 12px;
 position: relative;
 text-align: right;
 top: 35px;
 right: 35px;
 background-color: #FFFFFF;
 border-color: #5A224D;
 border-radius: 14px 14px 14px 14px;
 border-style: solid;
 border-width: 1px;
 color: #000000;
 float: right;
 font-size: 10px;
 font-weight: bold;
 padding: 2px 5px;
 z-index: 100;
 line-height: 12px;
}

Though the two DIV are structurally same, why they are displayed differently. This issue occurs only in Chrome. Firefox displays it correctly. If I change the top property to 0, the output in Chrome is this:

enter image description here

Usual Firefox output (if top is 35px):

enter image description here

Whats the CSS issue here?

  • 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-17T03:54:38+00:00Added an answer on June 17, 2026 at 3:54 am

    Try setting krc_item to position:relative, then use position:absolute for krc_item_quantity. You will probably have to adjust the positioning after doing so.

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

Sidebar

Related Questions

I have two DIV elements. HTML looks like this: <div id=first><div id=second></div></div> The CSS
I have two div -elements, the top one has the height of 40% and
I have two div in my website page one beside the other(one left and
I have two div elements as below: <div class=sc-info tags=abc mno> .... </div> <div
I have two div-elements where one representing a post (status post) and one representing
I have two div elements that are twins (i.e. their dimensions and contents are
I have two div's one has textbox in it and other just plain text.
The scenario is I have two div s: one is where I select items
I have one parent DIV inside parent DIV i have two DIV one in
How to wrap one div around another? I have following two div ids: #course

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.