Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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:
Copy link to clipboard
Copied
"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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Fixed it myself the way I see it is the changes to the text etc should be made in the selector of header not fixed to an element. Thanks
Copy link to clipboard
Copied
That makes no sense.
The css you showed was perfectly fine and the way you had applied it to the <td> tag was also perfectly fine.
Although if you are declaring header text you should be using a header tag, that is what they are for, h1 - h6
h1 {
bah: blah;
}
through to:
h6 {
bah: blah;
}
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
"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!