Sent by Zoe M. Gillenwater on 28 February 2005 16:04
Hi AJ,
Welcome!
First off, you probably haven't received any replies to this message
because you posted it under an existing thread, instead of starting a
new one. To start a new thread, send a new message to
[EMAIL-REMOVED] instead of replying to an existing message.
Another possibility for lack of response is the vague subject line.
It's best to include a descriptive subject line, since many people
decide whether or not they want to read a thread based on its subject.
The more descriptive you can be, the more likely it is that those who
can offer good advice to your specific problem and are willing to do so
will find you.
Now, on to your problem.
A J Hackler wrote:
> My site has one background with two tables..lined up vertically, not
> in columns. The first table has three rows across the screen (the
> first row has my logo graphic on top of the background, the second row
> has my site name, the third row has my logo (all three rows use the
> same black background file. Under the table but on the main
> background I have my horizontal menu (used CoffeeCup to create it).
> Under the menu is the second table which is sized as one row only and
> has a separate background and expands downward (tiles) as the page
> calls for it depending on the content for each page.
>
> I'm trying to understand how I can keep the format for each row and
> table with the menu between them on the page, but I don't understand
> the command for the style for table identification since the tables
> don't have names.
You give elements "names" by assigning them classes or ids. You can
then reference them in your style sheet to apply specific formatting to
specific elements.
> Would I use the following: (assuming a link to the stylesheet)
>
>
> <DIV ID #.masthead (URL to background);
> TR1 (URL to my graphics);
> TR2 (my site name);
> TR3 (my logo) (all fonts, colors, etc. would be entered for
> each line that it pertains to)
>
> <DIV ID#TR (and enter all the fonts, colors, etc. for this bottom
> table since it is different from the top table)
I'm not clear on whether the above is supposed to be (X)HTML or CSS.
Either way, it is not correct. Your (X)HTML might look like this:
<table id="masthead">
<tr><td><img src="logo.gif"></td></tr>
<tr><td><h1>Site Name</h1></td></tr>
<tr><td><img src="logo.gif"></td></tr>
</table>
<ul id="menu">
...
</ul>
<table id="content">
...
</table>
Your CSS might then look like this:
#masthead img { ... }
#masthead h1 { ... }
#menu { ... }
#menu li { ... }
#content { ... }
One other note: based on the page structure you are describing, I see no
reason to use tables. Replacing those table cells with divs could be
done easily and would give you a lot more flexibility and good karma.
And of course, css-d is here to help with your transition should you run
into problems.
Zoe
--
Zoe M. Gillenwater
Design Specialist
Highway Safety Research Center
http://www.hsrc.unc.edu
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/