0

I am playing around in my first ASP.net/HTML/CSS Application.

I need draggable panels and used Ajax-Control-Toolkit, it works good and I am only using one panel so far!

It looks like this:enter image description here

Now I want to fit the panels into its parent-containers "div"-containers, you can see them in the background, with borders (LEFT,TOP,BOTTOM).I have used those CSS-Settings for the children-panels:

.dragpanel-left {
    top:0px;
    left:0px;

    width: 50%;
    height: 50%;
}

The problem is, when I use it like this, it gets overwritten by element.style{}, I tried to use !important but the panel can't be resized nor moved then.

Any idea how to solve this problem? Is there a "use !important once" tag or something so when the site is built, the panel is placed into its parent and after that can be freely moved?

Zesa Rex
  • 412
  • 1
  • 4
  • 16

1 Answers1

0

element style is higher in the css hierarchy, means that you have to replace it at runtime (or not set it at all to let css being mean).

think about using js and events like dragstart, dragend and so on to manipulat the element style

FrontTheMachine
  • 526
  • 3
  • 14
  • Where can I find element.style then? It isn't in my css-sheet. – Zesa Rex Oct 24 '17 at 10:06
  • if you never used `javascript` or `javascript events` take a look at this https://www.w3schools.com/js/js_events.asp and then to integrate it in a asp page https://msdn.microsoft.com/en-us/library/aa479011.aspx, btw you need a little bit of study :) – FrontTheMachine Oct 24 '17 at 10:12
  • Yeah.. Well, I know Java pretty well and would've used Vaadin-Framework but I am kinda forced to use ASP.net and I have no experience in building websites like this, using HTML and JS. :p – Zesa Rex Oct 24 '17 at 10:19