Help - Search - Members - Calendar
Full Version: spacing on submenu
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
MindyT
Hi, on http://www.mediaservicesunlimited.com/bixler/homepage.php I'm trying to adjust the spacing on the submenu class but neither padding-top or margin-top works. if I can get some help I would really appreciate it.
CODE

* {
    margin:0;
    padding:0;
}
body {
    Height:100%;
    width:100%;
    background-color:#cccb99;
}

    nav {
        background-color:#000000;
        padding-top:2%;
        width:40%;
        height:27px;
        margin-top:2%;
        margin-left:auto;
        margin-right:auto;
        padding-left:3%;
    }
    nav a {
        color:red;
    }
        
    nav ul {
        list-style-type:none;
    }
    nav > ul > li {
    
    }
    nav > ul li a {
        background-color:#000000;
    }
    
    nav li {
        
        float:left;
        margin-right:3%;
    }
    nav > ul > li > ul {
        display:none;
        position:absolute;
    }
    nav > ul > li:hover > ul {
        display:block;
    }
    nav ul ul li {
        display:block;
        width:60px;
    }
    .submenu {
        width:200px;
    }
    .submenu a {
        padding-top:2%;
    }
    .submenu a:hover {
        background-color:red;
        color:#000000;
    }
    #logo {
        width:304px;
        margin-left:auto;
        margin-right:auto;
        margin-top:2%;
        margin-bottom:2%
    }
    h3 {
        color:#763c3c;
        text-align:center;
        margin-bottom:2%;
    }
    #contactInfo {
        float:left;
    }
    #servicesList, #eocialMedia {
        float:right;
        width: 33%;
    }
    article {
        float:left;
        width:35%;
        height:45%;
        margin-left:10%;
        margin-bottom:6%;
        background-color:#FFFFFF;
    }
    aside {  
        float:right;    
        width:30%;
        height:35%;
        margin-right:10%;     
        background-color:#FFFFFF;    
    }
    footer {
        background-color:#000000;
        overflow:auto;
        Width:100%;
        padding-left:10%;
        padding-top:2%;
        padding-bottom:2%;
        color:#C4C4C4;
          clear:both;
    }
.

[code]
<?php
function headerInfo() {
return <<<HEREDOC
<header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a>
<ul>
<li class="submenu"><a href="#">Agents</a></li>
<li class="submenu"><a href="#">Locations</a></li>
</ul>
<li><!--end of about us menu list -->
<li><a href="#">Services</a></li>
<li><a href="quote.php" tabindex="4" accesskey="Q">Get A Quote</a></li>
<li><a href="#">Contact</a>
<ul>
<li class="submenu"><a href="pay-my-bill.php">Pay My Bill</a></li>
<li class="submenu"><a href="contact.php">Cotasct Us</a></li>
</ul>

</nav>
<figure id="logo">
<img src="assets/bixlerlogo.png" width="304" height="88" alt=""/>
</figure>
<h3>Service Beyond The Contract </h3>
</header>
HEREDOC;
}
/*end of headerInfo function */

/*start of footerInfo function */
function footerInfo() {
return <<<HEREDOC
<footer>
<div id="contactInfo">
Bixler Insurance <br/>
1043 South 13th St. <br />
Decatur, IN 46733<br />
Phone: (260)-724-3438
</div>
<div id="eocialMedia">
social media icons
</div>
<div id="servicesList">
list of services
</div>
</footer>
}
HEREDOC;
}
/*end of footerInfo function */

function states($states)
{
echo "<option value = \"AL\"";if($states == "AL"){ echo ' SELECTED'; }echo">AL</option>";
echo "<option value = \"AK\"";if($states == "AK"){ echo ' SELECTED'; }echo">AK</option>";
echo "<option value = \"AR\"";if($states == "AR"){ echo ' SELECTED'; }echo">AR</option>";
echo "<option value = \"AZ\"";if($states == "AZ"){ echo ' SELECTED'; }echo">AZ</option>";
echo "<option value = \"CA\"";if($states == "CA"){ echo ' SELECTED'; }echo">CA</option>";
echo "<option value = \"CO\"";if($states == "CO"){ echo ' SELECTED'; }echo">CO</option>";
echo "<option value = \"CT\"";if($states == "CT"){ echo ' SELECTED'; }echo">CT</option>";
echo "<option value = \"DE\"";if($states == "DE"){ echo ' SELECTED'; }echo">DE</option>";
echo "<option value = \"DC\"";if($states == "DC"){ echo ' SELECTED'; }echo">DC</option>";
echo "<option value = \"FL\"";if($states == "FL"){ echo ' SELECTED'; }echo">FL</option>";
echo "<option value = \"GA\"";if($states == "GA"){ echo ' SELECTED'; }echo">GA</option>";
echo "<option value = \"HI\"";if($states == "HI"){ echo ' SELECTED'; }echo">HI</option>";
echo "<option value = \"IA\"";if($states == "IA"){ echo ' SELECTED'; }echo">IA</option>";
echo "<option value = \"ID\"";if($states == "ID"){ echo ' SELECTED'; }echo">ID</option>";
echo "<option value = \"IL\"";if($states == "IL"){ echo ' SELECTED'; }echo">IL</option>";
echo "<option value = \"IN\"";if($states == "IN"){ echo ' SELECTED'; }echo">IN</option>";
echo "<option value = \"KS\"";if($states == "KS"){ echo ' SELECTED'; }echo">KS</option>";
echo "<option value = \"KY\"";if($states == "KY"){ echo ' SELECTED'; }echo">KY</option>";
echo "<option value = \"LA\"";if($states == "LA"){ echo ' SELECTED'; }echo">LA</option>";
echo "<option value = \"MA\"";if($states == "MA"){ echo ' SELECTED'; }echo">MA</option>";
echo "<option value = \"ME\"";if($states == "ME"){ echo ' SELECTED'; }echo">ME</option>";
echo "<option value = \"MD\"";if($states == "MD"){ echo ' SELECTED'; }echo">MD</option>";
echo "<option value = \"MI\"";if($states == "MI"){ echo ' SELECTED'; }echo">MI</option>";
echo "<option value = \"MN\"";if($states == "MN"){ echo ' SELECTED'; }echo">MN</option>";
echo "<option value = \"MO\"";if($states == "MO"){ echo ' SELECTED'; }echo">MO</option>";
echo "<option value = \"MS\"";if($states == "MS"){ echo ' SELECTED'; }echo">MS</option>";
echo "<option value = \"MT\"";if($states == "MT"){ echo ' SELECTED'; }echo">MT</option>";
echo "<option value = \"NC\"";if($states == "NC"){ echo ' SELECTED'; }echo">NC</option>";
echo "<option value = \"ND\"";if($states == "ND"){ echo ' SELECTED'; }echo">ND</option>";
echo "<option value = \"NE\"";if($states == "NE"){ echo ' SELECTED'; }echo">NE</option>";
echo "<option value = \"NH\"";if($states == "NH"){ echo ' SELECTED'; }echo">NH</option>";
echo "<option value = \"NJ\"";if($states == "NJ"){ echo ' SELECTED'; }echo">NJ</option>";
echo "<option value = \"NM\"";if($states == "NM"){ echo ' SELECTED'; }echo">NM</option>";
echo "<option value = \"OH\"";if($states == "OH"){ echo ' SELECTED'; }echo">OH</option>";
echo "<option value = \"OK\"";if($states == "OK"){ echo ' SELECTED'; }echo">OK</option>";
echo "<option value = \"OR\"";if($states == "OR"){ echo ' SELECTED'; }echo">OR</option>";
echo "<option value = \"PA\"";if($states == "PA"){ echo ' SELECTED'; }echo">PA</option>";
echo "<option value = \"RI\"";if($states == "RI"){ echo ' SELECTED'; }echo">RI</option>";
echo "<option value = \"SC\"";if($states == "SC"){ echo ' SELECTED'; }echo">SC</option>";
echo "<option value = \"SD\"";if($states == "SD"){ echo ' SELECTED'; }echo">SD</option>";
echo "<option value = \"TN\"";if($states == "TN"){ echo ' SELECTED'; }echo">TN</option>";
echo "<option value = \"TX\"";if($states == "TX"){ echo ' SELECTED'; }echo">TX</option>";
echo "<option value = \"UT\"";if($states == "UT"){ echo ' SELECTED'; }echo">UT</option>";
echo "<option value = \"VA\"";if($states == "VA"){ echo ' SELECTED'; }echo">VA</option>";
echo "<option value = \"VT\"";if($states == "VT"){ echo ' SELECTED'; }echo">VT</option>";
echo "<option value = \"WA\"";if($states == "WA"){ echo ' SELECTED'; }echo">WA</option>";
echo "<option value = \"WI\"";if($states == "WI"){ echo ' SELECTED'; }echo">WI</option>";
echo "<option value = \"WV\"";if($states == "WV"){ echo ' SELECTED'; }echo">WV</option>";
echo "<option value = \"WY\"";if($states == "WY"){ echo ' SELECTED'; }echo">WY</option>";
}
l
?>

pandy
Works fine for me. Can you show us how the rule for .submenu looks with your changes in place? You must have made some mistake.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.