• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Categories
  • Contact Us
    • Advertising
    • Requests
    • Privacy Statement
HelpSpa.com

HelpSpa.com

Computer Tutorials

How to Select a Single page with a CSS ID in Dreamweaver with a .DWT template.

August 24, 2011 by davidwank

Challenges with Dreamweaver Templates

Those of us familiar with Dreamweaver .DWT template files know their tremendous advantages, and their limitations.  One of the difficulties with .DWT templates is that once you’ve setup a website using .DWTs, it can be difficult to pick out a single page based on a CSS ID tag.  People often use an ID attached to a <body> tag in order to be able to select and manipulate an individual page for a particular purpose; but with .DWT”s, you can’t make different ID’s on the body tag.

The Solution is an Editable Header and <head> Tag.

While your <body> tag is likely consumed by the template, it’s very likely that your <head> tag has editable regions.  If you are adding any kind of meta tags, you will have an editable <head> tag.  So in order to take advantage of the <head> tag, simply add a <style> tag to the <head> area of the page in question, and you can then manipulate the CSS to your needs.

 

Let’s Look at An Example.

For example, let’s say you have an image with the ID “myImage” you want to display on every page on the website except for the “contact” page.   Go ahead and add the image to the .DWT so that the image code propagates to all of your pages.  Now in order to remove the image from the contact page, simply open up the contact page and add the following code within the header tag:

[sourcecode language=’html’]

[/sourcecode]

How this method solves the problem

What will happen is that the page will render and read the site’s main .css file.  The browser will then read the above style code that you put in the <head> tag, which will override the site’s global stylesheet.  In this manner, the image with the myImage tag will now be hidden on the contact page.

Summary

In order to apply  CSS code to  individual pages using Dreamweaver and .DWT templates, simply add a <style> tag with your overriding CSS code to the <head> tag of the page in question.

css-id-dreamweaver

Filed Under: Dreamweaver

Primary Sidebar

More to See

Google Analytics 4 Migration Training

December 22, 2022 By davidwank

Hubspot Zoom Webinar Integration

Connecting HubSpot and Zoom Webinars

August 27, 2022 By davidwank

Google Analytics as we know it is going away!

July 24, 2022 By davidwank

Footer

Text Widget

This is an example of a text widget which can be used to describe a particular service. You can also use other widgets in this location.

Examples of widgets that can be placed here in the footer are a calendar, latest tweets, recent comments, recent posts, search form, tag cloud or more.

Sample Link.

Recent

  • Google Analytics 4 Migration Training
  • Connecting HubSpot and Zoom Webinars
  • Google Analytics as we know it is going away!
  • Building a New Dental Website?
  • BackupBuddy Timeouts on GoDaddy Hosting

Search

Tags

Adobe Acrobat Backup classical music and opera cPanel DAM Database Digital Photography email Excel Facebook Firefox hardware HP Security HTML iMovie Internet Explorer iTunes linksys Microsoft Office Microsoft Word MySQL networking Office 2010 OneNote OpenOffice OS X PDF PHP printers reseller hosting Reviews router SEO subversion Video Virtualization Virtual PC Web Design Web Development Web Hosting Windows Windows 7 Windows Vista Windows XP Wireless

Copyright © 2025 · Magazine Pro on Genesis Framework · WordPress · Log in