Link to home
Start Free TrialLog in
Avatar of thechase22
thechase22Flag for United Kingdom of Great Britain and Northern Ireland

asked on

My CSS styles are not applying in dreamweaver for my site

Hi all

I have good knowledge with dreamweaver, been using it for years, but this problem I have just found, well I cant figure it out.
Basically, I cant change the font type no more, I cant change the color no more, I cant change size, and I really cant figure it out, even if a style has 36 size, it doesnt move the actual text I have selected. Proberbly a simple solution so I help others can help me out.

Cheers

Chase
Avatar of Rouchie
Rouchie
Flag of United Kingdom of Great Britain and Northern Ireland image

This can happen if you have multiple style assigned to an object.  Check that you don't have a generic style in the style sheet that's overriding all the others,
e.g.   p {font-size:36pt} would affect every instance of a paragraph on your site.
Avatar of thechase22

ASKER

how do you do that?
Check the properties of the element you are trying to change.  i.e. in code view look at the code that is created around the element.  You might see STYLE= or CLASS=

Then go into the style sheet and check these out.  Elements in the style sheet such as P should always appear first because style sheets use an importance ranking (last = most important), therefore if this style comes later in the document, it will override any previous style that are applied.
ok this is what I have for one span class="style25">Track Title </span>, I even delete all the styles on the panel and I still cannot make the txt bigger or change the color, or change the size.

And I dont see no P in the code or in the style sheet.
Can you tell me what is outside even the span tag in the html code?  It might be easier if you post the whole block of code.  I'm looking for one of these --> DIV, TD, TR, TABLE, P

All can have style assigned to them which affect whatever is inside.  If you then have a span, then DW just adds that style on after all the others have been applied.  You should definitely be able to see STYLE25 in the style sheet.  What properties does that style have assigned?
Ok as below, sorry for the spam

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Home</title>
<style type="text/css">
<!--
.style25 {
      font-size: 36px;
      font-family: "Courier New", Courier, monospace;
      color: #FF0000;
}
-->
</style>
</head>

<body>
<table width="73%" border="1" align="center" cellpadding="0" cellspacing="4" bordercolor="#000000">
  <tr bgcolor="#000000">
    <td width="31%" bordercolor="#FF0000" bgcolor="#FFFFFF" scope="row">      <span class="style25">Track Title </span></td>
    <td width="10%" bordercolor="#FF0000" bgcolor="#FFFFFF">      <center class="style20 style15">
      <strong>        Size      </strong>
    </center>    </td>
    <td width="13%" bordercolor="#FF0000" bgcolor="#FFFFFF"><span class="style20 style17"><strong>Length</strong></span></td>
    <td width="13%" bordercolor="#FF0000" bgcolor="#FFFFFF"><center class="style20 style15">
      <strong>      Preview      </strong>
    </center>    </td>
    <td width="13%" bordercolor="#FF0000" bgcolor="#FFFFFF"><center class="style20 style15">
      <strong>      Comments      </strong>
    </center>    </td>
    <td width="33%" bordercolor="#FF0000" bgcolor="#FFFFFF"><center class="style20 style17">
      <span class="style23">        Submit Date      </span>
    </center>    </td>
  </tr>
  <tr>
    <td scope="row">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td scope="row"><span class="style20">01. No mercy </span></td>
    <td>      <center>
        10000k
    </center></td>
    <td><center>
      2:01
    </center></td>
    <td><center class="style9">
      <a href="#">Play      </a>
    </center></td>
    <td><center>
      4
    </center></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td scope="row"><span class="style20">02. Beauty</span></td>
    <td>      <center>
        9806k
    </center></td>
    <td><center>
      4:45
    </center>    </td>
    <td><center class="style9">
      <a href="#">Play      </a>
    </center></td>
    <td><center>
      1
    </center></td>
    <td class="style25">&nbsp;</td>
  </tr>
  <tr>
    <td scope="row"><span class="style20">03. Save your life </span></td>
    <td><center>
      7809k
    </center></td>
    <td><center>
      1:52
    </center>    </td>
    <td><center class="style9">
      <a href="#">Play      </a>
    </center></td>
    <td><center>
      2
    </center></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td scope="row"><span class="style20">04. Dance away </span></td>
    <td><center>
      8990k
    </center></td>
    <td><center>
      6:56
    </center>    </td>
    <td><center class="style9">
      <a href="#">Play      </a>
    </center></td>
    <td><center>
      16
    </center></td>
    <td>&nbsp;</td>
  </tr>
</table>
<h3>&nbsp;</h3>
</body>
</html>
Make sure that in the style there is no class for TABLE or TR or TD
If removing them doesn't work then the only way to change the font on the screen is to edit STYLE25 manually in the style sheet.
So could you see what I was doing wrong? Because ive looked at my table and I have no styles on it, I even made txt outside the table and its no joy, im getting this on every different site im working on I think, I think its to do with a global setting somewhere like dont display css im not sure.
If the appearance of the text is controlled by the style, then you have to edit the style directly.  There's a style panel available in the main menu bar that you can use to edit these.

Alternatively switch to code view and change the appearance directly in code.
This is my point, I currently have no style selected, and the text is size 36, and it really isnt size 36, more like size 12, understand what I mean?
Can you post a link to the page with a description of where the bad formatting is, so that I can investigate it all?
I sent you the code?

I cant really send you the link, because its happening on all my pages and websites, even if I have style with such and such font, and huge letters, different color it just wont budge, I swear its a setting Ive touched, but not sure?
I really cant figure this out, I think its broken, ive looked in the options a few times over, they just dont change from anything I do, color or font type or size, no matter what they dont budge, but when I export the page, or preview it, it shows it all!!!!

Its definately a setting preventing showing styles.
Its not stuff that's within a locked region is it?
whats that mean? I went ahead and checked like region and stuff encoding they seem ok, common Rouchie what else, I know were close to home :P

You said you had this problem last time?
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Excellent the problem was the "Style Rendering - Display Styles should be checked" well it wasnt, I know it was something simple like that.

Thanks a bunch for your comments guys