Jump to content
red

cascade and external stylesheets - a small puzzle

Recommended Posts

If I put a couple of properties in the style section of my html page, they work fine. If I take those same two rules and put them at the beginning or end of an external stylesheet (which is otherwise working fine) they do not work. Some conflict somewhere -- and no, putting "!important" or the display property on them doesn't help either. Identical css, just placed in different locations. ( If I put it on both the html and the external css, it also works -- as I expected it would). Here's the snippet: its to permit visible box borders in selected text..story.box{ /* limit to selected story */ margin:0; padding:.5em; border:1px solid black; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; index:100; }.text.box { margin:0; padding:2em; border:1px solid black; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; index:100; }

 

and the markup to invoke it is simply: <div class="story box">

Edited by red

Share this post


Link to post
Share on other sites

You can use the browser's developer tools to see what rule is overriding it.

 

Press F12 to open developer tools, go to the DOM Inspector and click on the element you expected to be styled. On the right panel there will be a list of all the selectors and styles that are being applied to it. There is no "index" property in CSS.

Share this post


Link to post
Share on other sites

Hmm, thanx for the tool tip. Didn't even know that was there. Useful. &ya, it's "z-index" isn't it. slipped my mind, & I've been using z-index for years. Ah, where did I put my Aricept? :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...