Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 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 10th, 2005, 03:01 AM
Authorized User
 
Join Date: Apr 2005
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default Making Styles effect the work place.

Making Styles effect the work place.

Hi All

I have created styles and I know that the style sheet is attached to the working page. However I have added a style “label” which is a standard HTML name.

I want to be able to use this as a style for labels generally which I want to have the same appearance as I have set for Links. Creating the style as directed on pages 134-137 is OK. But the style does not appear in the style drop down box part of properties. In fact none are visible there. In theCookingPlace example the styles were visible and all we had to do was highlight a piece of text then using the style drop dowm click on a style and hey presto all's done. How do I get there and Is that where I WANT TO GO?

Just to see it work I have created a style called h5 and when I highlight some text and click h5 in the properties format then the text is effected.

I am actually getting confused. Again my objective is to have the styles control the appearance of the entire page but how do I attach new style to the text. IE. Where should “labels” appear so that I can attach to the text.

My style code is below as well as the html page.

label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    font-style: normal;
    font-weight: normal;
    color: #000000;
    text-align: right;
    border: thin;
}
a:link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    text-transform: capitalize;
    color: #000000;
    text-decoration: underline;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
}
a:visited {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    text-transform: capitalize;
    color: #000000;
    text-decoration: underline;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
}
a:hover {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    text-transform: capitalize;
    color: #FF0000;
    text-decoration: underline;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
    font-weight: normal;
}
a:active {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    text-transform: capitalize;
    color: #0000FF;
    text-decoration: underline;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
    font-weight: bold;
    }



h5 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    color: #000000;
    text-align: left;
    text-transform: capitalize;
    text-decoration: none;
}

button {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    font-weight: normal;
    text-transform: capitalize;
    color: #000000;
}
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx
HTML Page which has been created Dynamic PHP as oppose to basic HTML.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--


-->
</style>
<link href="stylesheets/mrnsStyles.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#B7E8FF" >
    <td width="24">&nbsp;</td>
    <td width="80%">&nbsp;</td>
    <td width="10">&nbsp;</td>
    <td width="13">&nbsp;</td>
    <td width="248"><a href="logOn">Log on</a></td>
    <td width="24">&nbsp;</td>
  </tr>
  <tr bgcolor="#B7E8FF" >
    <td width="24">&nbsp;</td>
    <td rowspan="3"><img src="images/logo.png" width="241" height="85"></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="248">Your Account </td>
    <td width="24">&nbsp;</td>
  </tr>
  <tr bgcolor="#B7E8FF" >
    <td width="24">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="248"><h5>Logged on : </h5></td>
    <td width="24">&nbsp;</td>
  </tr>
  <tr bgcolor="#B7E8FF">
    <td width="24">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td width="248">&nbsp;</td>
    <td width="24">&nbsp;</td>
  </tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C1CBD7">
  <tr>
    <td width="24">&nbsp;</td>
    <td><a href="Indexmrnswebsite2.php">Home</a>
     Project Selector <a href="Indexmrnswebsite2.php">
     Recrutment</a>
     <a href="mgmtrpt">Management Reports</a> Controler
     Contact us<a href="help">
     Help</a> </td>
    <td width="24">&nbsp;</td>
  </tr>
</table>

</body>
</html>
Jacky Kenna

Seems to take hours getting to know how this or that works and during the process of remaking the page again and again it can be demoralising but when it all works then the time spent seems OK.



 
Old June 12th, 2005, 10:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi again,

Label won't appear in the classes list because it's not a custom class, but it's overriding default behavior of the <label> tag.

Basically, there are three types of selectors:

1: .MyClass
Starting with a dot, this selector allows you to create custom classes that can be used like this:

<a href="#" class="MyClass">

2: #MyId
Starting with an #, this selector is applied to an object on your page with an ID of MyId. IDs should be unique, so this can only refer to one object:

<a href="#" id="MyId">

3: h3 or a or label or h2 or td etc etc
These selectors override the default behavior of existing Html tags.
In your case, you were using label to override the tag <label>

So, you probably should rename Label to .Label. Then the class appears in the classes list and you can apply it to elements in your page.

If you want to know the nitty gritty of Css, check out this book: http://www.wrox.com/WileyCDA/WroxTit...764576429.html

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 13th, 2005, 06:03 AM
Authorized User
 
Join Date: Apr 2005
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

Again thanks. I need to study the associated books but there is not the time just now but I will. I put the point and the styles appeared so I can spply them.

Jacky






Similar Threads
Thread Thread Starter Forum Replies Last Post
Making serial comm work with SerialPort GMan Visual Basic 2008 Essentials 3 March 7th, 2008 05:32 AM
making special characters work Brian Campbell XSLT 4 January 10th, 2007 03:43 PM
Effect of changing option value anshul Javascript How-To 4 May 17th, 2005 06:05 AM
making php work? P.Y.sum Beginning PHP 5 November 5th, 2003 10:28 AM
making an .exe work cooky4 VB Databases Basics 2 June 3rd, 2003 11:31 PM





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