darksniperx Posted November 13, 2009 Share Posted November 13, 2009 I am customizing drupal zen theme. I am trying to set left margin of a div element using css. #sidebar-left { margin-left:20px; } When I test it out nothing happens. Any help would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/181439-cant-get-margin-left-to-work/ Share on other sites More sharing options...
BillyBoB Posted November 13, 2009 Share Posted November 13, 2009 Is sidebar-left an id or a class name? Quote Link to comment https://forums.phpfreaks.com/topic/181439-cant-get-margin-left-to-work/#findComment-957142 Share on other sites More sharing options...
darksniperx Posted November 13, 2009 Author Share Posted November 13, 2009 Here is the div element, its an id. <div id="sidebar-left"><div id="sidebar-left-inner" class="region region-left"> <?php print $left; ?> </div></div> <!-- /#sidebar-left-inner, /#sidebar-left --> Although I have no idea what this means 'class="region region-left"'. I have tried to remove it, nothing happends. Quote Link to comment https://forums.phpfreaks.com/topic/181439-cant-get-margin-left-to-work/#findComment-957157 Share on other sites More sharing options...
haku Posted November 14, 2009 Share Posted November 14, 2009 There is probably a CSS selector with a higher precedence than the selector you are trying to use. Use Firefox with the firebug plugin, and inspect that element (the left sidebar) to find out which selector is taking higher precedence. Actually, there is one other possibility with Drupal - you may have your CSS set to cache. Go to admin->settings->performance (Drupal 6), and see if it is. You can clear your cache there, and any changes you have made may start to work, if there isn't a selector with higher precedence. Quote Link to comment https://forums.phpfreaks.com/topic/181439-cant-get-margin-left-to-work/#findComment-957294 Share on other sites More sharing options...
darksniperx Posted November 15, 2009 Author Share Posted November 15, 2009 There is probably a CSS selector with a higher precedence than the selector you are trying to use. Use Firefox with the firebug plugin, and inspect that element (the left sidebar) to find out which selector is taking higher precedence. Actually, there is one other possibility with Drupal - you may have your CSS set to cache. Go to admin->settings->performance (Drupal 6), and see if it is. You can clear your cache there, and any changes you have made may start to work, if there isn't a selector with higher precedence. I have tried clearing css cashe. No change. Thanks, I completely forgot about firebug. It was layout-liquid.css that was taking precedence. Quote Link to comment https://forums.phpfreaks.com/topic/181439-cant-get-margin-left-to-work/#findComment-957758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.