Doubt with Draggable placement

0

I need to take a question with you! I'm creating a Dashboard for Administering a website, but I'm having a hard time figuring out why when I place an image on the scale you want, but when you update it, it stays in the desired position on the page of the site, ie the landing page, but is exactly the measure of its width to the right on the Adm Panel.

As well as I do not know if I could express myself to the point of understanding my doubt, I am attaching the access address for the friends to verify what is happening

Adm Dashboard Page: link

Landing page (Site): link

I also publish the page code of the Admin panel for analysis.

<script type="text/javascript">
 $(window).load(function () {

 // Posicionamento do LogoTipo
 $('#logoWrapper').draggable({
    drag: function (e) {
        var offset = $(this).find('img').offset();
        var xPos = offset.left;
        var yPos = offset.top;
        $('#posXimg').val(xPos);
        $('#posYimg').val(yPos);
    }
});

// Tamanho do LogoTipo
$('#logo').resizable({
    resize: function (event, ui) {
        var endW = $(this).outerWidth();
        var endH = $(this).outerHeight();

        $('#posWimg').val(endW);
        $('#posHimg').val(endH);

    }
});

// Posicionamento da Barra Menu
$('#menuWrapper').draggable({
    drag: function (e) {
        var offset = $(this).find('ul').offset();
        var xPos = offset.left;
        var yPos = offset.top;
        $('#posXul').val(xPos);
        $('#posYul').val(yPos);
    }
});
});
</script>
</head>
<body style="margin:0 auto; background:#FFF;">

<div style="margin:0 auto; height:130px; width:1024px; background:#CCC;">

<div id="logoWrapper">
<?php
$logo = $_POST['logo'];
$hori_logo = $_POST['hori_logo'];
$vert_logo = $_POST['vert_logo'];
$larg_logo = $_POST['larg_logo'];
$altu_logo = $_POST['altu_logo'];

$query = mysql_query("SELECT * FROM topo");
$res = mysql_fetch_array($query);
?>

<img width="<?php echo $res['larg_logo'];?>" height="<?php echo $res['altu_logo'];?>" title="LogoTipo" src="../../upload/<?php echo $res['logo'];?>" id="logo" class="ui-draggable ui-draggable-handle" style="cursor: move; position:absolute; left: <?php echo $res['hori_logo'];?>px; top: <?php echo $res['vert_logo'];?>px;" />
</div>

<div style="position:absolute; cursor:move; left: <?php echo $res['hori_menu'];?>px; top: <?php echo $res['vert_menu'];?>px;" id="menuWrapper">
<?php //include "menu/barra_menu.php"; ?>
</div>
</div>

<?php if(isset($_POST['enter'])){

$logo = $_POST['logo'];
$hori_logo = $_POST['hori_logo'];
$vert_logo = $_POST['vert_logo'];
$larg_logo = $_POST['larg_logo'];
$altu_logo = $_POST['altu_logo'];

$update = mysql_query("UPDATE topo SET hori_logo = '$hori_logo', vert_logo = '$vert_logo', larg_logo = '$larg_logo', altu_logo = '$altu_logo', hori_menu = '$hori_menu', vert_menu = '$vert_menu'");

if($update == ''){

echo "<script language='javascript'>
window.alert('Erro ao atualizar dados!!!');
</script>";
}else{
echo "<meta http-equiv='refresh' content='0; URL= ../painel/topo.php'>
<script language='javascript'>
window.alert('Dados atualizados com sucesso!');
</script>";
}}
?>

Needing more, just ask that I'll be posting what they need so they can help me solve this image placement problem on the Ad Panel page.

Already thanking the attention of all, with a strong hug.

    
asked by anonymous 27.06.2015 / 06:19

1 answer

1

This is because the position: relative; property is being applied together with the #logoWrapper id on the

27.06.2015 / 19:34