Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts

    change border of a child

    Such a simple thing, and it looks like a mess.

    I've got a snippet of CSS that isn't changing the border of a nested div to red. Everything else changes fine, but that is staying white

    Here's the css:

    Code:
    .advance { border:0px; position:absolute; top: 308px; left: 18px; padding: 0px 3px 2px 3px; font-size: 14px !important; cursor:pointer; margin-left:1px;  }
    .advance-icon {border:1px solid #fff;float:left; padding: 0px 3px 2px 3px;}
    .advance-text {float:right;border:0px;position:relative;top:2px;}
    
    .advance-icon:hover {color:#ff0000; border:1px solid #ff0000; padding: 0px 3px 2px 3px;}
    .advance-text:hover {float:right;border:0px;position:relative;top:2px;}
    /* .readmore {position:absolute; top:310px;left:43px;} */
    
    .expand:hover{ color:#ff0000; border:1px solid #ff0000; } 
    .advance:hover, .advance:hover * { color:#ff0000; }
    .expand a:hover, .advance a:hover { color:#ff0000; }
    and here is the html:
    Code:
    <div class="advance advance-home gal2"><div class="advance-icon">&raquo;</div> <div class="advance-text">&nbsp;Read more</div></div>
    Last edited by turpentyne; 03-05-2013 at 07:49 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello turpentyne,
    Look at it like this -
    Code:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    .advance {
    	margin-left: 1px;
    	padding: 0px 3px 2px 3px;
    	position: absolute;
    	top: 308px;
    	left: 18px;
    	font-size: 14px !important;
    	border: none;
    	cursor: pointer;
    }
    .advance-icon {
    	padding: 0px 3px 2px 3px;
    	float: left;
    	border: 1px solid #fff;
    }
    .advance-text {
    	margin-top: 2px;
    	float: right;
    	border: none;
    }
    .advance:hover * { 
    	color: #ff0000; 
    	border-color: #f00; 
    }
    </style>
    </head>
    <body>
    	<div class="advance advance-home gal2">
    		<div class="advance-icon">&raquo;</div>
    		<div class="advance-text">&nbsp;Read more</div>
    	</div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    turpentyne (03-05-2013)

  • #3
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts

    perfect

    That did it..

    and cleaner looking too.

    THanks


  •  

    Posting Permissions

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