Jump to content

Charles @ CodeConquest.com

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by Charles @ CodeConquest.com

  1. Try in your css:

    #wrapper {min-width: 1060px;}

    This ensures that if the browser window is too small to display the content without scrolling, the content will still display normally as it would full-width (which happens to be 1060 pixels in your case)

  2. Congratulations just told the OP to add a extra closing div tag which is not required, put specs on and check again, if you still can't see it! let me point it out for you, actually i'll point them ALL out.
    Sorry, did not see the closing tag for #menuh. Thank you for pointing that out!
    Those are conditional comments created by Microsoft in order to make up for such a bad browser.
    It's not to 'make up for such a bad browser', it's so that you can link up style sheets which only get read by IE and not the other browsers, because there are a lot of HTML elements and CSS properties it does not / did not support.
  3. In your css add a border declaration:

    border: solid 1px #000;

    Replace the hex code with whatever color you want. Also, because the borders will double up, you'll need to remove the border from either the top or bottom.

    border-top: none;

    And then add it back in, but only for the first element.

    :first-child {border-top: solid 1px #000;}

  4. Give anchor menu elements display:block; and float: left;
    I don't think that's what's causing the problem. I think it's because this tag:
    <div id="d-menu">

    ...isn't closed. After this code:

    <div id="d-menu">   <a href="#" onclick="return false;" onmousedown="menudrop('menu1')" class="nm">Menu1</a>    <div id="menu1" class="drop">         <h1>Data Menu Satu Disisni</h1>    </div>   <a href="#" onclick="return false;" onmousedown="menudrop('menu2')" class="nm">Menu2</a>    <div id="menu2" class="drop">         <h1>Data Menu Bua Disisni</h1>    </div>   <a href="#" onclick="return false;" onmousedown="menudrop('menu3')" class="nm">Menu3</a>    <div id="menu3" class="drop">         <h1>Data Menu Tiga Disisni</h1>    </div>   <a href="#" onclick="return false;" onmousedown="menudrop('menu4')" class="nm">Menu4</a>    <div id="menu4" class="drop">         <h1>Data Menu Empat Disisni</h1>    </div>

    add in another closing

    </div>

    tag.

    • Like 1
  5. Again just a little confused. So i'm creating a php file to insert my navigation code in to. When I link that code in to my other html pages do they need to be switched to php? That's what's confusing me.
    A PHP file is just an HTML file with a different file extension, and with snippet(s) of PHP code included. In this case, the PHP code you're using is:
    <?php include"nav.html";?>

    So the pages that you want to insert the navbar into need to be .php, because they're the pages with the PHP code. The file it is you're inserting can be PHP if you need it to be, but in this case it's just static HTML so you can leave the extension as .html (see in the code above it's nav.html, not nav.php). Hope this makes sense.

    2)This code uses php to display opening and closing html UL tags therefore must have filename of nav.php
    <?php  echo '<ul id="nav">';?><li><a href="index.php">Home</a></li><li><a href="aboutus.php">About Us</a></li><li><a href="contactus.php">Contact Us</a></li><?phpecho '</ul>';?>

    Why would you need to write the tags using PHP? Isn't it just static HTML?
  6. Hi Jimmy, First, make this the first line of code in your HTML:

    <!DOCTYPE html>

    This will make sure that browsers don't render your page in quirks mode. Quirks mode can make some elements on your page render strangely - you don't want to have to deal with that. To answer your question, to center an element with CSS, use

    margin: auto;

    This will center it horizontally but not vertically. If you want to center vertically, the only way to do that is to adjust margin/padding manually. Good luck!

  7. In your CSS, change:

    footer {position:absolute;bottom:0;left:0;width: 100%;height: 3em;-webkit-box-shadow: 1px 0px 8px 0px #000;-moz-box-shadow: 1px 0px 8px 0px #000;box-shadow: 1px 0px 8px 0px #000;background-color: RGBA(1, 1, 1, 0.9);color: RGBA(1, 1, 1, 0.7);}p#copyright{position: inherit;bottom: 30%;left: 50px;color: #FFF;font-family: 'Open Sans', arial, serif;}#top{position:inherit;bottom: 30%;right: 30px;color: #FFF;font-family: 'Open Sans', arial, serif;text-decoration: none;}

    to...

    footer {position:fixed;bottom:0;left:0;width: 100%;height: 3em;-webkit-box-shadow: 1px 0px 8px 0px #000;-moz-box-shadow: 1px 0px 8px 0px #000;box-shadow: 1px 0px 8px 0px #000;background-color: RGBA(1, 1, 1, 0.9);color: RGBA(1, 1, 1, 0.7);}p#copyright{bottom: 30%;left: 50px;color: #FFF;font-family: 'Open Sans', arial, serif;}#top{bottom: 30%;right: 30px;color: #FFF;font-family: 'Open Sans', arial, serif;text-decoration: none;}

×
×
  • Create New...