#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    17
    Rep Power
    0

    "over-ruling" definitions in CSS


    I'm still new to CSS, but this struck me as odd:

    if i have in my CSS:

    img { border: none}

    noborder {boder:none}


    ______

    Now, if in the html i make a div class=noborder, the image in this div will still have a border... is there any way of "over-ruling" prior definitions that I'm missing?

    Thanks, Matt
  2. #2
  3. nx
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2003
    Location
    USA
    Posts
    626
    Rep Power
    0
    well, i believe thats cuz noborder needs a . before it
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    17
    Rep Power
    0
    sorry, that was a typo

    here is the exact prob im having now. im assuming its a simple solution, but im pretty confuddeled:

    img {
    border: solid white 1px;
    }

    .imgdown{
    border: yellow;
    }
    <div class="imgdown">

    <img src="http://www.asdfpics/yourguide.jpg" alt= ski>

    </div>

    ______

    This does not make the border yellow, and something even stranger is when i put border: yellow solid 1px; then a yellow border does appear, but completely not the right size and this whole thing is tripping me out:SSSS

    matt
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    11
    Rep Power
    0
    try
    Code:
    .imgdown img {
    border: 1px solid yellow;
    }
    or if u don't want the border
    Code:
    .imgdown img {
    border: 0;
    }
    addin the img there lets you control all imgs contained in the div with class=imgdown
    Last edited by dope; January 13th, 2004 at 11:15 PM.

IMN logo majestic logo threadwatch logo seochat tools logo