Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 June 24th, 2014, 11:29 PM
Authorized User
 
Join Date: Jun 2014
Posts: 16
Thanks: 7
Thanked 0 Times in 0 Posts
Default Chapter 3: Trying Out the CSS Editor

Hi there,

Could not get "look around" link to turn to orange when mouse over the link.


Default.aspx

Code:
<%@ Page Language="VB" %>

<!DOCTYPE html>

<script runat="server">

    Protected Sub Page_Load(sender As Object, e As EventArgs)

    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            color: #990033;
        }
    </style>
    <link href="Styles/Styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
    <form id="form1" runat="server">
    <div id="PageWrapper"> 
        <header>Header Goes Here</header>
        <nav>Menu Goes Here</nav>
        <br />
        <section id="MainContent">
   
        <h1>Hi there visitor and welcome to Planet Wrox</h1>

        </section>
        <aside ="Sidebar">Sidebar Goes Here</aside>
       <br />
         <p>
             We're glad you're<span class="auto-style1"> paying a visit</span> to <a href="http://www.PlanetWrox.com">www.PlanetWrox.com</a>, the coolest music community site on the internet.

         </p>
        
        <p>
            Feel free to have a<a href="Default.aspx"> look around</a>; there are lots of interesting <strong>reviews and concert pictures</strong> to be found here.
Styles.css

Code:
* 
{
    font-family: Arial;
}

header {
    background-color: #C0C0C0;
    width: 844px;
    height: 86px;
}

h1 {
    font-size: 20px;
    padding: 0;
    margin: 0 0 10px 0;
}

.Introduction {
    font-style: italic;
    color: #003399;
}

#PageWrapper {
    width: 844px;
    margin: auto;
}

nav {
    width: 844px;
}

/*#region Main Content */

section#MainContent 


{
    width: 664px;
    float: left;
}

section#MainContent a 
{
    color: #4CFF00;
    text-decoration: underline;
}

    section#MainContent a:visited 
    {
        color: #FF0000;
        text-decoration: underline;
    }

    section#MainContent a:hover 
    {
        color: #FFA500;
        text-decoration: underline;
    }

/*#endregion*/

aside 
{
    background-color: Gray;
    width: 180px;
    float: left;
}

footer {
    background-color: #C0C0C0;
    width: 844px;
    clear: both;
}
Cheers,
Mohamad
 
Old June 25th, 2014, 12:54 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Your paragraphs and links are outside your MainContent section element and are thus not affected by the styles. Move them into the section and it should work.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
mohamad (June 25th, 2014)





Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS chapter 7 John Leftwich BOOK: Beginning HTML, XHTML, CSS, and JavaScript 1 July 10th, 2013 06:01 PM
Chapter 7 - WPF Text Editor - pg 236 Crissytenav BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 2 April 14th, 2010 10:38 AM
Chapter 10 Editor Problems kellenjb BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 June 8th, 2004 08:16 PM
Chapter 10 editor.php Tachyon BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 March 17th, 2004 10:37 PM





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