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

  • Home
  • SEARCH
  • 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 8108885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:14:56+00:00 2026-06-06T01:14:56+00:00

Background info I’m developing a visual form designer in which people with no coding

  • 0

Background info

I’m developing a visual form designer in which people with no coding experience can drag around form fields to create forms and print them or save as a HTML document.

I introduced a way to draw straight lines that can also be slanted at any angle. I accomplished this by using a normal div with no height and using only the bottom border. And when I apply CSS rotate transform to the div, it can be angled at any degree.

Problem

In the designer, when the user changes the angle(slope) of the line, I apply the styles via Javascript. Something like this:

lineWrapper.style.webkitTransform = "rotate(" + angle + "deg)";
lineWrapper.style.MozTransform = "rotate(" + angle + "deg)";

When the user wants to save the form as HTML, I get the outerHTML and return it to the user. Here, if I’m using Chrome, the MozTransform property is not there in the generated HTML and if I’m in Firefox the webkitTransform is not there.

Approaches I tried

I tried to solve this in many ways:

  • Instead of setting it via style property, I tried setting it via style.cssText property. It didn’t work.
  • I can take the outerHTML of the div during HTML generation and insert the properties, but it’s a very messy thing to do.
  • I can compromise by giving CSS classes for commonly used angles (0, 45, 90, 135, 180 etc), but I don’t want to give up here too quickly.

So, I’m asking you guys – Is there a better way to solve this problem?

Thanks in advance,
Shesh

  • 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-06T01:14:58+00:00Added an answer on June 6, 2026 at 1:14 am

    Dont set the style with ‘.style’ instead use ‘setattribute’. It should add both in both browsers. Also this will allow you to apply the style with one command.

     lineWrapper.setattribute("style", "-webkit-transform : rotate(" + angle + "deg); -moz-transform : rotate(" + angle + "deg)");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background info : I was handed a Tool, which was made using MS-Access 2007,
Can someone give me some info/background info on how I might go about writing
Relevant background info I've built a little software that can be customized via a
Background info: I'm coding with C#, using Microsoft SQL Server for databases. I didn't
Background-info: I'm using Microsoft Visual Web Developer 2010 Express. Info about my (lack of)
Some background info: I am working on an opengl game for fun/experience, and in
Background info I have an app where users can make microsites ala http://myname.the_app.com .
The following is some background info on this post. You can just skip to
Please help! Background info I have a WPF application which accesses a SQL Server
Background Info: Windows 7, Visual C++ 2010 Express Problem: CreateProcess() keeps returning with 'Invalid

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.