473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

confused about syntax

I am confused about the syntax used in the style sheet that accompanies the website I've inherited and have been asked to tidy up. XHTML is new to me, and I've only used CSS for font and link styles in the past.

The style sheet includes such things as div#header. Is this correct? I thought it should be either div header or #header. I can't find any reference to this online.

Also, the html references two style sheets in addition to the one for IE. One is called 'layout.css' and the other is 'themes/index.css'. 'themes/index.css' seems to be some kind of template with only a few things in it.

Here's the top of the html page – I have asked in a separate thread whether the DTD and html bits are correct or not as they seem to be different from the W3c recommendation:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xml:lang="en">


<head>

<title>...</title>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv= "pragma" content="no-cache" />
<meta name="Author" content="... Copyright © 2006 ..." />
<meta name="keywords" content="..." />
<meta name="description" content="..." />

<link href="images/favicon.ico" rel="shortcut icon" />


<link href="css/layout.css" rel="stylesheet" type="text/css" media="screen" />

<link href="css/themes/index.css" rel="stylesheet" type="text/css" media="screen" />


<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6work.css" type="text/css">
<![endif]-->


</head>

I have been trying to amalgamate 'index.css' and 'layout.css', but some of the property values in them seem to conflict (things such as 'position: fixed' and 'position: relative' for the same selector). Oh dearie me... Does the second style sheet referenced on the html page override the first one if there is a conflict? Has it been done for a reason? (I think maybe the designer uses a template called themes/index.css for all his pages as they do look very similar, and then writes a separate one for the details. Could that be the case here? Is it good practice?)

I can post style sheets and html if that will help, but they are works in progress and I did inherit a bit of a mess...

Thank you.

Helen
Jan 25 '07 #1
2 1435
drhowarddrfine
7,435 Expert 4TB
Using div#header or #header is the same and only personal preference.

position:fixed does not work in IE6 at all. The second style sheet can override any attributes set in the first one.
Jan 25 '07 #2
Thank you for the clarification. Well, I think I've managed to merge index.css and layout.css with, so far, no dire outcome. Now I have to see what happens when I put in the updated content...
Jan 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

45
by: Edward K. Ream | last post by:
Hello all, First of all, my present state of mind re pep 318 is one of sheepish confusion. I suspect pep 318 will not affect Leo significantly, but I am most surprised that an apparently...
1
by: David Bear | last post by:
This may be a dumb question but I'm confused. using command line syntax pipe like this: cat somefile | pyscript In my pyscript I can simply do buffer = sys.stdin.read()
9
by: jfj | last post by:
Hi. Suppose this: ######################## def foo (x): print x f = classmethod (foo)
2
by: Mark | last post by:
I have a pretty strange problem on my hands. I know of the syntax for what I'm trying to do without templates, but not with, and I've come to a point now where I don't really know where else to...
5
by: shumaker | last post by:
I'm trying to learn how to make and use aliases for two tables in in this update statement: ALTER PROCEDURE dbo.UpdateStatus AS UPDATE dbo.npfields SET Status = N'DROPPED' FROM dbo.npfields...
8
by: Øyvind Jægtnes | last post by:
I'm playing around a bit with XPath and nodelist and i want to extract some info from a RSS feed. The one that i am testing at can be viewed at http://slashdot.org/index.rss Ok.. heres the deal:...
2
by: James Foreman | last post by:
I want to do something that I'm sure is quite simple, but the DB2 SQL Reference isn't too clear on this (lots of examples of things that I don't want...) Assume a table like this: CREATE TABLE...
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
4
by: mattmao | last post by:
I am moving onto the tough part in learning C:( First, about the declaration of a user defined structure: I found this syntax in my lecture notes: struct userinfo { char username; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.