Hi, any help with this issue would be greatly appreciated
I've set up a new HTML document and have applied various CSS classes to the text, which I can see in Dreamweaver. The trouble is that when I preview in the browser, or try a LIVE preview, the styles go away. Basically the method for creating the styles was to create new CSS rule from the CSS palette, and select Class, name the class and apply the styling. The font I'm using is Roboto, which is the default font for Android, which I have installed. Again I can see the text styling in Dreamweaver just not in the browser.
Dear Sir/Madam,
The answer lies in your markup and at this stage you are but we are not privy to.
To start with, Roboto may be the default for Andriod, but it certainly is not for the OS that I use. Hence this font will not be shown on my system.
But you speak of other style rules that are not being recognised.
To save a lot of to-ing and fro-ing, please supply a link to your site.
Add the highlighted line and change the style rules as follows
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<style type="text/css">
.PrimaryHeading {
font: 600 16px/28px 'Roboto', sans-serif;
color: #333333;
padding-top: 0%;
padding-right: 0%;
padding-bottom: 0%;
padding-left: 0%;
}
.BodyCopy {
color: #333;
font: 400 normal 12px/18px 'Roboto', sans-serif;
}
.ImageAlign {
float: right;
}
.BodyCopyItaLIC {
font: italic normal 12px/normal 'Roboto', sans-serif;
}
.BodyCopyBold {
font: 900 normal 12px 'Roboto', sans-serif;
color: #333;
}
</style>
I'm not a developer and in my line of work I have to touch code maybe once every 2 years and it's usually to do something pretty specific. I realize nothing beats being able to code but the reason I use DW is so I don't have to. So, is it not possible to reliably style text with CSS in DW? That seems hard to believe!
Despite what you may have been led to believe, basic coding skills are an essential part of working with DW. You can use the CSS editor if you wish, but you won't be able to do advanced things without some coding skills.
If code isn't your thing, maybe you should use a different web authoring tool like Muse.
Nancy O.
It sure seems like I used to be able to reliably apply CSS styles to text in DW and have it work in the browser. That seems pretty basic, and I've been doing it on and off since DW 2. I have looked into Muse, but I'm pretty comfortable with DW. I'm not averse to learning to code more, but I'm also stumped about this issue because it doesn't make a lot of sense why DW would show a styled document and not render it in a browser correctly. What I'm trying to do isn't advanced it's basic.
98% of browser display issues cause by code errors. Are you validating your HTML & CSS code to ensure there are no errors in it?
Code validation tools
http://jigsaw.w3.org/css-validator/
Nancy O.
I did use DW to do the above.
The main difference between what you had and the suggested version is the reference to the Google web fonts library. Each time the page is opened, a call is made to Google to retrieve the fonts.
Another difference is the way that the fonts have heen styled. If you go to Google web fonts, you will be shown how to do this.
Glad it works.
North America
Europe, Middle East and Africa
Asia Pacific