Avatar billede viuf Juniormester
09. marts 2008 - 12:10 Der er 1 løsning

Hjælp til visning af side

Hej
lavet prøveside www.viuf.de

Nogle af punkterne i menu´erne skulle gerne vises på midten af side i div id="mainContent" , men det vil det ikke.

Bruger allwebmenus til at lave menu´erne og der kan man linke til f.eks div id="mainContent".
Kan se at den linker men der sker intet på siden.

Nogen der kan hjælpe ?? (ikke så god til det)

Kode:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
body  {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    background-color: #99FF99;
}

/* Tips for Elastic layouts
1. Since the elastic layouts overall sizing is based on the user's default fonts size, they are more unpredictable. Used correctly, they are also more accessible for those that need larger fonts size since the line length remains proportionate.
2. Sizing of divs in this layout are based on the 100% font size in the body element. If you decrease the text size overall by using a font-size: 80% on the body element or the #container, remember that the entire layout will downsize proportionately. You may want to increase the widths of the various divs to compensate for this.
3. If font sizing is changed in differing amounts on each div instead of on the overall design (ie: #sidebar1 is given a 70% font size and #mainContent is given an 85% font size), this will proportionately change each of the divs overall size. You may want to adjust based on your final font sizing.
*/
.thrColElsHdr #container {
    width: 48em;
    margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
    border: 1px solid #000000;
    text-align: left; /* this overrides the text-align: center on the body element. */
    background-color: #99FF99;
}
.thrColElsHdr #header {
    padding: 0 10px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
    background-color: #99FF99;
}
.thrColElsHdr #header h1 {
    background-color: #99FF99;
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 0px;
    padding-left: 0;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
}

/* Tips for sidebar1:
1. Be aware that if you set a font-size value on this div, the overall width of the div will be adjusted accordingly.
2. Since we are working in ems, it's best not to use padding on the sidebar itself. It will be added to the width for standards compliant browsers creating an unknown actual width.
3. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColElsHdr #sidebar1 p" rule.
*/
.thrColElsHdr #sidebar1 {
    float: left;
    width: 10em; /* top and bottom padding create visual space within this div */
    background-color: #99FF99;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #FFFFFF;
    padding-top: 15px;
    padding-right: 0;
    padding-bottom: 15px;
    padding-left: 0;
}
.thrColElsHdr #sidebar2 {
    float: right;
    width: 8em; /* since this element is floated, a width must be given */
    background: #EBEBEB; /* top and bottom padding create visual space within this div */
    padding-top: 15px;
    padding-right: 0;
    padding-bottom: 15px;
    padding-left: 0;
    margin-right: 5px;
}
.thrColElsHdr #sidebar1 h3, .thrColElsHdr #sidebar1 p, .thrColElsHdr #sidebar2 p, .thrColElsHdr #sidebar2 h3 {
    margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
    margin-right: 10px;
}

/* Tips for mainContent:
1. If you give this #mainContent div a font-size value different than the #sidebar1 div, the margins of the #mainContent div will be based on its font-size and the width of the #sidebar1 div will be based on its font-size. You may wish to adjust the values of these divs.
2. The space between the mainContent and sidebar1 is created with the left margin on the mainContent div.  No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends.
3. To avoid float drop, you may need to test to determine the approximate maximum image/element size since this layout is based on the user's font sizing combined with the values you set. However, if the user has their browser font size set lower than normal, less space will be available in the #mainContent div than you may see on testing.
4. In the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs that may occur.
*/
.thrColElsHdr #mainContent {
    background-color: #FFFFFF;
    width: auto;
    margin-top: 0;
    margin-right: 8.5em;
    margin-bottom: 0;
    margin-left: 8.2em;
}
.thrColElsHdr #footer {
    padding: 0 10px;
    background-color: #99FF99;
}
.thrColElsHdr #footer p {
    margin: 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 10px;
    padding-left: 0;
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
    float: left;
    margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
.style6 {font-size: large}
.style8 {font-size: xx-small}
.style9 {
    font-size: medium
}
.style10 {color: #000000}
.style11 {font-size: medium; color: #000000; }
-->
</style>
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColElsHdr #sidebar1, .thrColElsHdr #sidebar2 { padding-top: 30px; }
.thrColElsHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->


</head>

<body class="thrColElsHdr">
<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="menu",awmBN="728";awmAltUrl="";</script><script charset="UTF-8" src="menu.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->

<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu1 ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="menu1",awmBN="728";awmAltUrl="";</script><script charset="UTF-8" src="menu1.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu1 ******** -->
















<div id="container">
  <div id="header">
    <div align="center">
            <div id="layer1" style="width:108px; height:80px; position:absolute; left:64%; top:-6px; z-index:1;">
              <p align="center"><img src="fodbold.gif" width="101" height="80" border="0"></p>
            </div>
      <p>&nbsp;</p>
      <p><img src="tfcmenu.gif" alt="" width="740" height="113" /></p>
      <p>&nbsp;</p>
            <div id="layer2" style="width:740px; height:58px; position:absolute; left:20%; top:149px; z-index:1;">
                <p style="text-indent:10;" align="center"><B><A
href="http://www.cafefrispark.dk/" target="_self"
rel=nofollow><font size="5" color="#99CC00"><span style="color:rgb(153,204,0); text-decoration:none;">HUSK at bes&oslash;ge</span></font><FONT color=#99cc00><SPAN
style="COLOR: #99cc00; TEXT-DECORATION: none"> </SPAN></FONT><font size="6" face="Times New Roman" color="olive"><span style="color:rgb(153,204,0); text-decoration:none;">cafefrispark.dk</span></font></a><font size="6" face="Times New Roman" color="olive"><span style="color:rgb(153,204,0); text-decoration:none;"> </span></font></B><img src="frispark.gif" width="65" height="61" border="0" align="absmiddle"></p>
            </div>
      <p>&nbsp;</p>
    </div>
  </div>
  <div id="sidebar1">
    <p>.</p>
    <p>.</p>
    <p>.</p>
    <p>.</p>
    <p>.</p>
    <p>.</p>
    <p>.</p>
    <p align="center" class="style9">&nbsp;</p>
    <p>.</p>
    <p align="center">&nbsp;</p>
  <!-- end #sidebar1 --></div>
  <div id="sidebar2">
    <h3>sidebar2 Content</h3>
    <p>The background color on this div will only show for the length of the content. If you'd like a dividing line instead, place a border on the right side of the #mainContent div if the #mainContent div will always contain more content than the #sidebar2 div. </p>
    <p>Donec eu mi sed turpis f</p>
  <!-- end #sidebar2 --></div>
  <div id="mainContent">
    <h1 align="center"><!-- end #mainContent -->
    <span class="style6">Hej  fodbolddrenge og for&aelig;ldre.</span></h1>
    <p align="center">Vi har lavet en hjemmeside for </p>
    <p align="center">&aring;rgang 98 i Taastrup FC.</p>
    <p align="center"><img src="grus.gif" alt="" width="120" height="90" /> <img src="image001.gif" alt="" width="86" height="83" /> <img src="vinder1.gif" alt="" width="120" height="90" /></p>
    <p align="center">Hvis fodbold er noget for dig, s&aring;  m&oslash;d op til tr&aelig;ning.</p>
    <p align="center">Tr&aelig;ningstider/-steder kan du se  andet sted p&aring; siden.</p>
    <p align="center">Ved ris/ros/forbedringer/sp&oslash;rgsm&aring;l,  eller har du</p>
    <p align="center">&nbsp;nogle gode fotos af glade  TFC-drenge,</p>
    <p align="center">&nbsp;kan du kontakte os p&aring; denne mail:</p>
    <p align="center"><a href="mailto:webmaster@tfc98.dk">webmaster@tfc98.dk</a></p>
    <p align="center"><span class="style8"><strong>Holdbilleder</strong>&nbsp;</span></p>
    <p align="center"><img src="ny.gif" alt="" width="158" height="118" />  <img src="tip.gif" alt="" width="158" height="118" /></p>
    <div id="tag"></div>
  </div>

  <div align="center"></div>
  <div id="footer">
    <p align="center">&nbsp;</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
Avatar billede viuf Juniormester
03. oktober 2010 - 18:35 #1
lukket
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester