Skip to main content
Participant
December 27, 2019
Question

header text and css

  • December 27, 2019
  • 2 replies
  • 338 views

simple problem the text in the header is not modified by the css selector:

css in css file

.td-hdrtext {
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
text-align: center;
color: #EBDFE0;
}

source code:

<td width="89%" class="td-hdrtext">This is the header text</td>

 

I have validated this and this apparently is a parse error but as the selector was constructe inside DW 2019 using the sidebar I do not understand how this happens.

This topic has been closed for replies.

2 replies

Nancy OShea
Community Expert
Community Expert
December 27, 2019

Validate your code and fix reported errors. Window > Results > Validate....

Save all documents.  F5 to refresh Live View.

Also why are you using tables?  That's an obsolete approach to building web pages.

 

Nancy O'Shea— Product User & Community Expert
Participant
December 27, 2019

Thasnks for all the help folk, it is figured out and as to why I still use tables, I am used to them in simple sites where you can lay them out and fill in the boxes.

 

I am sure that just because css and 'float' have been invented doesn't make it better in all cases. Don't start the debate just my 2cents worth

Nancy OShea
Community Expert
Community Expert
December 27, 2019

"I am sure that just because css and 'float' have been invented doesn't make it better in all cases."

 

This is no debate.  CSS Flexbox and CSS Grids have replaced floats and tables.  Stay ahead of the curve or risk falling hopelessly behind it.  Your choice. 

 

Good luck in 2020!

Nancy O'Shea— Product User & Community Expert
Legend
December 27, 2019

When you say 'not modified by the css selector' what do you mean? Do you mean the font is not the correct font 'Gill Sans' or do you mean the color is in-correct, etc.

 

If its the style of the font then 'Gill Sans' is not a web-safe font, so the font will default to a font in your font-family which in your case would be plain old 'Helvetica'.

 

If you want to incorporate more inspiring fonts then you should use Google Fonts:

 

https://fonts.google.com/ 

 

 

 

 

Participant
December 27, 2019

"When you say 'not modified by the css selector' what do you mean? Do you mean the font is not the correct font 'Gill Sans' or do you mean the color is in-correct, etc."

I mean that the text in the page will not change from the original default to the text in the css. Nothing will change even when the css is changed. The class id does not seem to affect the outcome. Why? Is the code not written properly? Afterall the code was written by DW.

Legend
December 27, 2019

the css/code looks ok to me. If you remove the font-family, like below, does the correct color show up?

 

.td-hdrtext {
text-align: center;
color: #EBDFE0;
}

 

If it doesnt you may be experiencing a cached page in your browser which is showing an old version of your page.

Try emptying the cache or maybe if you have another browser look at the page in that.

 

Failing that then there must be something else in your other css selectors which is stopping the css cascade.