Wrox Programmer Forums
|
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2006, 11:52 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7, Inherit keyword not working

‘Inherit’ not working for me Chapter 7, Page 137, The Inherit keyword. Using IE6.0. XP Pro SP2
Intellisense does show the inherit keyword as an option. However at run time no inheritance has occurred.

Try 1 Style. Does not work. Border for childdiv not drawn.
div#parentdiv { border: thin solid black;}
div#childdiv { border: inherit;}

Try 2 Style. Also does not work. Border for childdiv not drawn.
div#parentdiv { border-style:solid; border-width:1px; border-color:Black;}
div#childdiv { border-style: inherit; border-width: inherit ; border-color: inherit;}

Try 3 Style. Also does not work if I put a <style> block in the heading, rather than linking.

Try 4 Style. Does not work if I remove the runat=”Server” from the <form> block.

Try 5 Style. Does not work if I remove the <form> block altogether.

Only way I can get the inner div border drawn is to NOT inherit:
div#parentdiv { border: thin solid black;}
div#childdiv { border: thin solid black;}

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <link rel="Stylesheet" href="StyleSheet.css" type="text/css" />
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="parentdiv" >
    This div has a border around it.
        <div id="childdiv">
            This div also has a border around it.
        </div>
    </div>
   </form>
</body>
</html>

Help anyone.

VV


 
Old April 12th, 2006, 12:08 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I don't think IE supports the "inherit" keyword. Honestly, I don't think it would make much difference anyway, can't think of any time in my professional career when I've really needed it.

http://msdn.microsoft.com/workshop/a...attributes.asp

If you want to see it work for academic reasons, load it up in Mozilla Firefox.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old April 12th, 2006, 12:13 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:
I was afraid of that (unsupported). Funny thing tho, is intellisense does
offer 'inherit' so that made me think it would work.

Good to know it's seldom used, as per your experience.
Not important then, and am proceeding.
Thanks.
VV







Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 - Two Views, not working for me... bigtalk BOOK: Beginning Ruby on Rails 1 January 3rd, 2008 07:30 AM
Chapter 6: store not working Giorgio84 BOOK: Beginning Ruby on Rails 2 June 17th, 2007 11:17 PM
Chapter 1, First App, No, it's not working redthor BOOK: Beginning Ruby on Rails 2 February 1st, 2007 08:32 PM
CHAPTER 18 example not working also! diegoborgh BOOK: Beginning JavaServer Pages 0 May 26th, 2005 11:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.