Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Trouble with absolute position inside a dnn moduleTrouble with absolute position inside a dnn module
Previous
 
Next
New Post
4/12/2013 5:29 AM
 

Hello,

i'm working on a project, but i'm quite new to dnn and website design in general.

I'm trying to create a dropdown menu using jquery and next to the menu i want to display a div, where the content will be displayed using ajax. 

I have to position the content div next to the menu, using absolute positioning. When i am in admin mode everything works fine since the container of the module is displayed and the absolute position is referred to the content of the module. The problem is that when i logout and the module-containers are no longer displayed, the absolute positioning of the div element is then referred to the whole page, wich results in the div to cover the whole page. 

Here is the code i'm using:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="Products.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $(".katalogos:eq(1)").click(function(){
    $(".pisina").slideToggle("slow");
  });

  $(".katalogos:eq(0)").click(function(){
    $(".monotika").slideToggle("slow");
  });

  $(".katalogos:eq(2)").click(function(){
    $(".thermo").slideToggle("slow");
  });

  $(".katalogos:eq(3)").click(function(){
    $(".klima").slideToggle("slow");
  });

  $(".katalogos:eq(4)").click(function(){
    $(".nero").slideToggle("slow");
  });

  $(".katalogos:eq(5)").click(function(){
    $(".antlies").slideToggle("slow");
  });

  $(".katalogos:eq(6)").click(function(){
    $(".ximika").slideToggle("slow");
  });

  $(".katalogos:eq(7)").click(function(){
    $(".stirigmata").slideToggle("slow");
  });

  $(".katalogos:eq(8)").click(function(){
    $(".automatismos").slideToggle("slow");
  });

  $(".katalogos:eq(9)").click(function(){
    $(".xrwmata").slideToggle("slow");
  });

  $(".katalogos:eq(10)").click(function(){
    $(".solines").slideToggle("slow");
  });

  $(".katalogos:eq(11)").click(function(){
    $(".idraulika").slideToggle("slow");
  });
  
});
</script>

<script>

$(document).ready(function(){
  $(".monotika li:eq(0)").click(function(){
    $("#perigrafi").load("perigrafi.txt #p1");
  });
});

</script>

</head>
<body>

<div class="products">

                                          

<div class="katalogos">Μονωτικά Υλικά

    </div>

<div class="lista">
<ul class="monotika">

<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>


</ul>




</div>


                                        

<div class="katalogos">Εξοπλισμός πισίνας

    </div>

<div class="lista">
<ul class="pisina">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                                


<div class="katalogos">Είδη Θέρμανσης

    </div>

<div class="lista">
<ul class="thermo">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>


                                              

<div class="katalogos">Είδη κλιματισμού

    </div>

<div class="lista">
<ul class="klima">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>


                  

</div>

                                              


<div class="katalogos">Επεξεργασία νερού

    </div>

<div class="lista">
<ul class="nero">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                         


<div class="katalogos">Αντλίες

    </div>

<div class="lista">
<ul class="antlies">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                       


<div class="katalogos">Χημικά

    </div>

<div class="lista">
<ul class="ximika">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>


                             


<div class="katalogos">Στηρίγματα

    </div>

<div class="lista">
<ul class="stirigmata">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                                    


<div class="katalogos">Αυτοματισμός

    </div>

<div class="lista">
<ul class="automatismos">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                                 


<div class="katalogos">Χρώματα

    </div>

<div class="lista">
<ul class="xrwmata">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                                    


<div class="katalogos">Σωληνώσεις

    </div>

<div class="lista">
<ul class="solines">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>

                                                


<div class="katalogos">Υδραυλικά

    </div>

<div class="lista">
<ul class="idraulika">

<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>


</ul>




</div>



                                                      


<div id=perigrafi></div>

</div>

</body>
</html>


 

 

And here is the css

.products .katalogos{

width:20%;
padding:5px;
background-color:mediumturquoise;
border:1px solid black;
text-align:center;
opacity:0.6;
filter:alpha(opacity=60);
cursor:pointer;


}

.products .lista{

width:21%;
overflow:hidden;

}

.products li{


background-color:orange;
padding:5px;
border:1px solid black;
opacity:0.6;
filter:alpha(opacity=60);
cursor:pointer;

}

.products ul{

list-style-type:none;
display:none;

}


.products #perigrafi{

height:100%;
width:75%;
background-color:lightgreen;
position:absolute;
top:10px;
right:10px;
}

.products .katalogos:hover{

opacity:1;
filter:alpha(opacity=100);

}

.products li:hover{

opacity:1;
filter:alpha(opacity=100);

}


 

 
New Post
4/12/2013 9:22 PM
 

Umm firstly - not sure why you would be showing what appears to be a html document.

You should not be using any html markup that includes <HTML> <HEAD> or <BODY> tags.
DNN and the controlling asp.net skin layout are the only place that these sort of elements can occur - not in your own markup.

Also it sounds like you dont have a module container selected for your skin - when dnn is in admin mode it will automatically load up a default container for editing purposes - but if you dont have an actual container declared for your skin - it wont know what to load when not in admin mode.

Westa

 
New Post
4/13/2013 5:56 AM
 

Wes,

First of all thank you for your time. Since i'm not working directly inside the module, but use visual studio or notepad first, i posted the whole html document. Of course only the part enclosed in the body section goes into the dnn module, and the script part goes into module settings-> header.

The css i'm posting is part of the asp.net skin.

Assuming you're right about the module container, i have to do a bit more research, to find out what i have to do. If you could point me to the right direction i would be grateful. Is this done through the skin.css file?

Imagine that a month ago i couldnt even write a single line of html code but thanks to w3schools i'm now using jquery and the likes. I'm doing this project for my dad's company!

regards Chris

 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Trouble with absolute position inside a dnn moduleTrouble with absolute position inside a dnn module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out