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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:29:39+00:00 2026-05-27T18:29:39+00:00

All I am trying to do is get some vertical spacing around equations. I

  • 0

All I am trying to do is get some vertical spacing around equations. I want to set a certain amount of space that appears before the equation and a certain amount after. I am trying all sorts of stuff, but it always seems do to something crazy. I understand about margin collapsing, but it’s clearly more than that going on. I’ve put in some absurd amounts of space to illustrate the wackiness. Can anyone help?

calcStyle.css:

body {font-size:180%;}
h2 {font-size:250%;}
h1 {font-size:170%;}
table {font-size:150%}
body {margin-left:30px;}
body {margin-right:30px;}
body {background-color:#ffffff;}
blockquote {
    margin-left 55px;
    margin-right 55px;
    font-style: italic;}
h1 {color:#222222;}
td {
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
}

th {
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
}
equation {
    margin-left:10px;
    margin-right:10px;
    padding-top:100px;
    padding-bottom:100px;
    padding-left:100px;
    padding-right:100px;
    margin-top:100px;
    margin-bottom:100px;
    border:50px #eeeeee;
    background-color: #ddddaa
}

html:

<head>
    <link rel="stylesheet" type="text/css" href="calcStyle.css" />
</head>
<body>
    easy math: <br />

    <equation>
        2+2=4
    </equation>
    <br /> 
    hard math:
    <br />
    <equation>
        3+3=6
    </equation>
    <br /><br />
</body>

Result:

enter image description 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-05-27T18:29:40+00:00Added an answer on May 27, 2026 at 6:29 pm

    You have your margins off. I have fixed them up here.

    In general, you can write your margins like: margin: top right bottom left than their allied margin-* attributes – where top, right, bottom and left represent the pixel width values that you can give as per your needs.

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

Sidebar

Related Questions

I am trying to get all the rows that exist in allData but not
I'm trying to get all the input elements from a certain form from jQuery
I am trying to get all users that are updated maximum 90 seconds ago:
I'm trying to get all the sublists that don't inherit from a specified class
I'm trying to get all domains that are available in the Windows Login dialog
I've been trying to get some animated models from c4d into Blender all day.
I'm playing around a bit and trying to get some things to work for
I am trying to get some data stored in a database that i can
I'm trying to get some code working that a previous developer has written. Yep,
I have been trying all day to get some data properly formatted in 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.