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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:29:40+00:00 2026-06-13T07:29:40+00:00

Why is it that my CSS is not applied the same in all browsers?

  • 0

Why is it that my CSS is not applied the same in all browsers? For example, for the below code:

<body align="center"  background="F:\photos\sravan\wi7.jpg">

I can see my text which is aligned center and with background in Chrome, but not the same in Mozilla! Why is this happening?

  • 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-13T07:29:41+00:00Added an answer on June 13, 2026 at 7:29 am

    Your code is not CSS

    Instead you should have HTML and CSS as in:

    <body>
        content
        ...
    </body>
    

    and body CSS

    body {
       background-image: url(URL to your image and not local path);
       text-align: center;
    }
    

    Learn the languages

    No offence but I warmly suggest you learn HTML and CSS before delving into writing any reasonable code.

    • Introduction to HTML
    • Introduction to CSS

    HTML Specification

    As per W3C specification body element doesn’t support align attribute and background is deprecated in 4.01 and not supported in HTML5. So don’t use it as an attribute. Define style using CSS:

    • in separate CSS file that you reference in HTML
    • add style element inside head HTML element
    • (not recommended) add style inline with your element:

      <body style="text-align: center; background-image: url(wi7.jpg);">
      

    Because of the way that CSS works having many inline styles makes your application hard to maintain and also intrduces new CSS hacks that you have to use in order for your page to render as expected. Separation of concerns rules. HTML file is your content definition, CSS file is its style. Keep them separate whenever possible.

    General advice

    Since browsers try to follow specification there may be differences between their rendering of HTML+CSS. Some may be very strict about it others a bit more loose. Try to stay within specification and you should get better cross-browser results.

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

Sidebar

Related Questions

I need CSS selector that match all input tags where type is not checkbox
I'm using some CSS properties that does not support in CSS 2.1. For example,
Is there any CSS hack to target just browsers that do not support the
The CSS that I'm attempted to attach to 'echo $tube->error;' is not showing.. It
I have some CSS style that does not work in IE and that works
The CSS :hover doesn't work in IE6 for elements that are not links. Is
not so long ago i found out that you can do this in css
Okay, I know that 1) this is probably not possible with CSS alone and
We all know that CSS sprite images are great to reduce the amount of
I'm having some trouble with IE not reading all of my CSS on the

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.