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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:43:57+00:00 2026-06-18T11:43:57+00:00

I am using margins to position elements (and add space between elements) in my

  • 0

I am using margins to position elements (and add space between elements) in my Web App that I created with Google Apps Script UiInstance.

The margins are not being applied properly in Firefox or Opera. They are being applied in Chrome and Internet Explorer, so I feel that the code is correct.

Here is an example which I have published here.

function doGet() {
  var app = UiApp.createApplication();
  app.add(app.createLabel("Some Text").setStyleAttribute("margin-left","500px").setStyleAttribute("margin-top","25px"));
  return app;
}

Can anyone explain why this is happening? Is this a bug, or is this bad practice and I should do something else?

Note: Using the Firefox inspector, I found nothing that would indicate a margin was attempted.

  • 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-18T11:43:58+00:00Added an answer on June 18, 2026 at 11:43 am

    Syntax issue, try it like this

    function doGet() {
      var app = UiApp.createApplication().setStandardsMode(false);
      app.add(app.createLabel("Some Text").setStyleAttribute("marginLeft","500px").setStyleAttribute("marginTop","25px"));
      return app;
    }
    

    or like this

    function doGet() {
      var app = UiApp.createApplication().setStandardsMode(false);
      app.add(app.createLabel("Some Text").setStyleAttributes({marginLeft :"500px",marginTop :"25px"}));
      return app;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using an HTML/CSS template to create a web app. For some reason the
I'm using jQuery to add a Class to a few elements. I'm not new
My code in this Fiddle shows that I have adjacent elements which vertical margins
I am unsure how to position elements using css, as when I use methods
I'm using the flexible box module to position two div elements horizontally with the
I'm using jQuery to position elements in a submenu. The html looks like: <div
I have an element on my page that i want to position using position:absolute.
Anyone have code to set margins(top,left,right,bottom) using excel interop and vb.net. I think it
I'm using a System.Windows.Forms.WebBrowser control next to textboxes with the left margins of each
I am using the code to add margin to a div on click. It

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.