0

i have created a popup window, the close icon at the top right corner is not properly set to the close button. i have my jquery like,

function LoadSampleTest() {
$("<div></div>")
    .attr('id','SampleQuestionDiv')
    .appendTo("body")
    .dialog({
        modal: true,
        close: function () { $(this).remove(); },
        Width: 800,
        height: 400,
        title: "Questions and Answers"
    }).load("/dashboard/sampletest/");

and my pop here,enter image description here

kindly tell how to achieve this.

Kavitha P.
  • 155
  • 1
  • 2
  • 13
  • use css to set the margins of the x – prospector Jan 23 '15 at 06:22
  • 1
    Check this http://stackoverflow.com/questions/17672445/hide-title-bar-and-show-close-button-in-jquery-dialog – Sadikhasan Jan 23 '15 at 06:41
  • @ prospector: Where the default class is "ui-dialog-titlebar-close span{display:block;margin:1px}" .By adding and removing classes from the browser console i found that, on setting "ui-dialog-titlebar-close span{display:block;margin:-8px}",i tried in changing of my css, but it not works. – Kavitha P. Jan 23 '15 at 12:02

2 Answers2

0

inspect the close icon and check the class of button. then adjust the width and height. use !important
eg:

p {
color: red !important;
}
Rogin Thomas
  • 672
  • 8
  • 17
0

@prospector is right!

The right way to achieve this is styling that button with CSS. Maybe, (as you don't posted your css code) there is some rule that is spoiling the default styling of that button. Use your preferred Developer Tool Inspector (Firefox, Chrome...) to inspect the rules applied to this button. If it's nothing interfering in its default rules, then You will have to create a CSS rule to that button to correct its position.

Vitox
  • 3,852
  • 29
  • 30
  • Where the default class is "ui-dialog-titlebar-close span{display:block;margin:1px}" .By adding and removing classes from the browser console i found that, on setting "ui-dialog-titlebar-close span{display:block;margin:-8px}",i tried in changing of my css, but it not works. – Kavitha P. Jan 23 '15 at 12:01
  • Is this in a public domain, or Can you provide a Jsfiddle? – Vitox Jan 23 '15 at 17:58