SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Auckland, NZ
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS just won't apply to DIV tag

    I used Artisteer to build the following Joomla 2.5 template (http://upgrade.rosmini.school.nz/). I needed to add an extra position called #icon-menu. I have done this but for some reason none for the icon-menu css is being applied to the div tag. When I inspect the element via Chrome, I can't see the CSS being used of overwritten anywhere. Its been a while since I've worked on CSS so am sure that I am overlooking something very obvious.... but just can't see what.

    HTML Code:
          <div class="ros-header">
            <?php if ($view->containsModules('position-0')) : ?>
            	<div class="icon-menu"><?php echo $view->position('position-0'); ?></div>
            <?php endif; ?>
            <div class="ros-headerobject"></div>
            <div class="ros-logo">
              <h1 class="ros-logo-name"><a href="<?php echo $document->baseurl; ?>/"><?php echo $this->params->get('siteTitle'); ?></a></h1>
              <h2 class="ros-logo-text"><?php echo $this->params->get('siteSlogan'); ?></h2>
            </div>
          </div>
    HTML Code:
    #icon-menu {
    	position: absolute;
    	top: 12px;
    	display:block;
    	left: 500px;
    }

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You have used a class in the html but used an id in the css

    Code:
    #icon-menu {
    	position: absolute;
    	top: 12px;
    	display:block;
    	left: 500px;
    }
    It should be:

    Code:
    .icon-menu {
    	position: absolute;
    	top: 12px;
    	left: 500px;
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Auckland, NZ
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Oops

    Twit that I am... I knew that it was something simple... very embarrassing, but thanks :-)

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    No worries - we all do it at some time


Bookmarks

Posting Permissions

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