Web Analytics Made Easy -
StatCounter Problem with div width - CodingForum

Announcement

Collapse
No announcement yet.

Problem with div width

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with div width

    Hello,

    I have the following css and when i enter some text i get for both DIVs in the same line? As you can see both of the DIVs have width:100%

    I can't figure out y is that.... any ideas?

    Thank you in advance!

    Code:
    #mainMenu {
    	font-size:.8em;
    	text-align: center;
    	margin-right: auto;
    	margin-left: auto;
    	width: 100%;
    }
    #mainMenu ul{
    	list-style-type:none;
    	padding:0;
    	margin:0;
    	}
    #mainMenu li{
    	float:center;
    	padding-left:.3;
    	padding-right:.3;
    	}
    	
    #mainMenu li a{
    	text-decoration: none;
    	display: block;
    	float: left;
    	padding-top: .2em;
    	padding-right: .5em;
    	padding-bottom: 0.3em;
    	padding-left: .5em;
    	}
    #mainMenu li a:hover{}
    #mainMenu li a:current{}
    
    #breadcrumbs {
    	font-size: 13px;
    	padding-left: 15px;
    	width: 100%;
    }

  • #2
    Share HTML as well (complete code)

    Comment


    • #3
      Code:
      <?php
      defined('_JEXEC') or die;
      $app = JFactory::getApplication();
      ?>
      <!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" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
      <head>
      <jdoc:include type="head" />
      <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
      <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
      <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/default.css" type="text/css" />
      </head>
      
      <body>
      <div class="default" id="wrapper">
      <div id="headerLogo">
      <p><img src="images/logo.jpg" width="1000" height="120" /></p>
      <div class="search" id="search">
      <jdoc:include type="modules" name="search" style="xhtml" /></div>
      </div>
      <div class="mainMenu" id="mainMenu">
      <jdoc:include type="modules" name="mainMenu" style="xhtml" />
      </div>
      <div class="breadcrumbs" id="breadcrumbs">
      <jdoc:include type="modules" name="breadcrumbs" style="xhtml" />
      </div>
      <div class="mainCenter" id="mainCenter">
      <jdoc:include type="message" />
      <jdoc:include type="component" />
      </div>
      <div class="footer" id="footer">
      <jdoc:include type="modules" name="footer" style="xhtml" />
      </div>
      </div>
      </body>
      </html>

      Comment


      • #4
        Here, its coming 100% only... however if you want to keep it 100%, then no need to define any width....

        Comment

        Working...
        X