View Full Version : Change background color of table
montoyaf
04-23-2007, 09:51 PM
I'm working with Dreamweaver. I have a frameset; left frame is a table with 13 links listed. I woud like to have the background of the table change when the user clicks on each link so that in new window shows the left frame in a different color and the content of the linked page. In addition, would like the table to change to a diffenet color, ex, link one table- is red, link 2 table - is green. Can that be done? Please tell me how. Thank you.
boxxertrumps
04-23-2007, 10:10 PM
Rule number one of web development, Don't use WYSIWYG editors.
Hand code your work.
Rule 2: Don't use tables for layout.
This can be achieved with CSS,
<table style="background-color:#ff0000;"> red BG.
<table style="background-color:#00ff00;"> green BG.
nwalton
04-23-2007, 10:24 PM
Rule number one of web development, Don't use WYSIWYG editors.
Or at least do all your design in the code view, and just use the image window for some visual feedback. (That's a good way to learn the hand-coding.)
boogyman
04-23-2007, 10:28 PM
Rule number one of web development, Don't use WYSIWYG editors.
Hand code your work.
I use dreamweaver but I use the coding view... so its not that they shouldn't use those editors, its that they shouldn't use the design view to "design" they should use it as a preview
Rule 2: Don't use tables for layout.
This can be achieved with CSS,
<table style="background-color:#ff0000;"> red BG.
<table style="background-color:#00ff00;"> green BG.
and CSS is the most effective way to accomplish this yes, but they should use id and class if for this as well and either do them in an internal embedded script in the head tag
<head>
<style type="text/css">
<!--
table { //Generic Table Background
background-color: #ffffff;
}
table.CLASS { // Background image across for multiple table tags in this page
background-image: url(host/path.extension);
}
table#ID { // 1 instance of this table element that has a background image with a similar color associated incase the picture doesnt show up
background: #ffffff url(host/path.extension);
}
// -->
</style>
</head>
where classes are for multiple instances within a given page and ids are for ONLY 1 instance inside the page
or if they are using the styles over multiple pages they should use an external linked file
<head>
<link type="text/css" rel="stylesheet" href="host/path.extension" />
</head>
montoyaf
04-25-2007, 08:55 PM
Thank you.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.