Results 1 to 2 of 2

Thread: Elements won't do width:100%

  1. #1
    Join Date
    Jan 2008

    Elements won't do width:100%

    Hey guys.

    I am absolutely stumped.

    I have a navigation background that is supposed to do width:100%;

    When it's but itself, it works as planned.

    When I put a <ul> inside of it, it doesn't work.

    At this point, I'm certain it's something incredibly stupid that I'm over-looking.

    Does anyone see anything wrong?

    HTML Code:
    		<div id="stretch">
    			<div id="header">
    					<ul id="main-nav" class="contain">
    						<li class="nav-logo"><a href="#"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="Geek Getting Fit" id="logo" /></a></li>
    						<li class="nav-item"><a href="#">rules</a></li>
    						<li class="nav-item"><a href="#">goals</a></li>
    						<li class="nav-item"><a href="#">archives</a></li>
    						<li class="nav-item"><a href="#">contact</a></li>
    						<li class="nav-search"><?php/* include (TEMPLATEPATH . '/searchform.php');*/ ?></li>
    /*******TAGS AND ELEMENTS*******/
    body { background: url(../../images/bg.jpg) repeat; font-family: Helvetica, Arial, sans-serif;  }
    #stretch { width: 100%; /*overflow: visible;*/ }
    .contain { width:960px!important; margin: 0 auto; }
    /* HEADER */
    #header { width: 100%; height: 70px; background: url(../../images/header.png) repeat-x; padding: 1px 0px; }
    #main-nav { height: 70px; }


  2. #2
    Join Date
    Apr 2003
    Nothing in the code given would cause that problem.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles