close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Page optimization? - Inline JavaScript, CSS

Thread began 11/16/2011 8:38 pm by jciol2009 | Last modified 11/18/2011 10:19 am by jciol2009 | 751 views | 1 replies

Jason ByrnesWebAssist

the css blocks in the head of the document are not Inline styles.

an inline style is one that is included with a tag using the style attribute:

<p style="border:1px solid #000000">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>



a style block defined in the head:

<style type="text/css" media="all">
p .addBorder {
border: 1px solid #000000;
}
</style>



Is referred to as an Internal style.

the example above can be applied to a paragraph tag using the class addBorder:

<p class="addBorder">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>



Inline styles are a bad practice. the driving concept behind CSS is to separate the design form the content. With inline styles, the design becomes part of the content.

with an Internal Styles and External Style (Styles defined in a linked .css file), the design is separated from the content.

The javascript applied by CSS Menu Writer is also not inline javascpt, it is not applied directly in an element.

It is used to create an event listener for the window.onLoad method, then trigger intializeMenu() function defined in the external javascript.
Defining the function in an external file is considered the correct practice, the code that calls the function will need to be in the main page.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...