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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:17:40+00:00 2026-06-05T11:17:40+00:00

My page (which uses HTML5) works fine with no doctype but when I add

  • 0

My page (which uses HTML5) works fine with no doctype but when I add the HTML5 doctype then the styles on the <div>s don’t seem to work (specifically, one <div> which is supposed to be aligned 20 pixels from the left isn’t aligning… another <div> which is supposed to have a height of 90% reverts to the default height… and another <div> which I’ve changed the line spacing and character spacing seems to use the default line spacing and character spacing). Styles on the <span>s work just fine though… it only seems to be the <div>s that have the problem. I’ve changed <div> to <section>… still doesn’t work. I’ve tried inline styles, then switched to a style sheet… neither way seems to work. I threw in some display:block; (not sure what that does) but it didn’t seem to do anything.

And by the way, nothing’s wrong with the code. I ran it through a validator and it’s got no errors at all.

  • 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-05T11:17:42+00:00Added an answer on June 5, 2026 at 11:17 am

    You have an error in your CSS

    .indented {
        display: block;
        left: 20;
        position: relative;
    }
    

    Should be:

    .indented {
        display: block;
        left: 20px;
        position: relative;
    }
    

    Note that you must specify a unit value for the value of 20 – otherwise it may be ignored (which is what is causing your problem!)

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

Sidebar

Related Questions

I have a simple html5 test page which uses LocalStorage to display / save
I have a search page which uses a simple ajax request to get new
I have a web page which uses in PHP and a jQuery DataTable to
I have created a JSF 2 page which uses Facelets to define the structure
I am working on a jsp page which uses a bean to create an
I am trying to setup a php page which uses cURL to hit a
Scenario: I have a login page which uses ajax to validate a user and
I'm trying to do a basic web page which uses both jQuery and MooTools.
Given remote page: http://example.com/paged_list.aspx which uses a Javascript function call to display several pages
I'm trying to develop an application which uses HttpRequest for requesting a web page.

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.