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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:52:46+00:00 2026-06-17T06:52:46+00:00

I have written a css for div positioning. here is the css background-color: white;

  • 0

I have written a css for div positioning.
here is the css

background-color: white; 
border-style: outset; 
margin: 115px 0px 0px -40px;

When I see the output in firefox then div position is ok but when I see this in chrome then output gets distorted due to margin: 145px 0px 0px -40px;

for chrome margin should be margin: 115px 0px 0px -40px;

So I search google and found a snippet and I applied but did not work. which was

style="width:310;height:402;background-color:white;border-style:outset; if webkit (margin:115px 0 0 -40px) else  (margin:146px 0 0 -40px);"

So guide me how could I write conditional inline css for chrome…any idea. 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-17T06:52:48+00:00Added an answer on June 17, 2026 at 6:52 am

    I wrote a test page, did not find what you said this situation.
    maybe you write a test page.
    Strictly speaking, firefox chrome is the standard of modern browers, should not have this kind of situation has.

    *{ margin:0; padding:0;}
    body{font:12px/1.5 arial;background:#fff;}
    .test{background-color: white; border-style: outset; margin: 115px 0px 0px -40px;}
    
    <div class="test"></div>
    

    demo here

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

Sidebar

Related Questions

I have written a code which makes a border of a div orange then
I have written some JS and CSS that allows certain columns to be flexible
I have a DIV which is written via an ajax call to a perl
Hi guys I have written this code <script> //animate 2 div while clicked on
I want to define the style of Div based on a CSS file. The
I have a similar problem as CSS Auto Margin pushing down other elements :
Some of my css div heights are being written by javascript when document.ready. The
I have written JQuery that adds a CSS attribute to a button when it
I have written a html code for login as follwing <div id=wrapper> <div id=page>
Here is the code I have written so far <!DOCTYPE html> <head> <meta http-equiv=Content-Type

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.