473,399 Members | 3,832 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,399 software developers and data experts.

CSS H1 effecting whole document instead of in block

Hi all,

He is a snippet of my code:

Expand|Select|Wrap|Line Numbers
  1. #column2 h1
  2. { font-family: arial, sans-serif;
  3.   padding: 16px 0px 5px 0px;
  4.   margin: 0px 0px 12px 0px;
  5.   border-bottom: 1px solid;
  6.   font-size: 150%;
  7.   text-transform: uppercase;
  8.   font-weight: normal;
  9. }
  10.  
  11. .box h1
  12. { font-weight: normal;
  13.   padding: 8px 0px 16px 0px;
  14.   text-transform: uppercase;
  15. }
  16.  

basically, in my html page i have a column and inside that column there is a box. However the column h1 style is formatting the box class h1 too. why is it doing that? is my syntax incorrect
Jul 9 '10 #1
2 1483
JKing
1,206 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. #column2 .box h1
  2. {
  3. font-weight: normal;
  4.   padding: 8px 0px 16px 0px;
  5.   text-transform: uppercase;
  6. }
  7.  
Add the id infront of your class.

The box h1 will still inherit the other properties that have not been set.
Jul 9 '10 #2
Thanks alot. I was playing around with the code and eventually ended up with the code you posted above. Wish I had came on earlier. Thanks for the reply.
Jul 10 '10 #3

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

Similar topics

1
by: Bartek | last post by:
Hello This is my problem: It consider xml 2 xml conversion. source document had unknown structure (xhtml), xslt must process every node, attribute, text, comments etc. from source and write in...
1
by: Hari Prakash | last post by:
Dear Honnen, It seems I need to specify 'xmlns="http://www.w3.org/1999/xhtml"' to all the table I'm using. Is there any way to make it apply to whole document. My idea is to include my own tags,...
20
by: pembeci | last post by:
I am using JavaScript to modify some text parts of a loaded document. The functions are loaded from a file at the header and run by: <body onLoad="..."> According to the the Venkman profile...
1
by: Steve Taylor | last post by:
I've got a custom XPathNavigator that encapsulates a stream. I'm using xpath expressions to seek forward to various positions within the stream. Using a limited set of xpaths, I can get my stream...
4
by: ctchrinthry | last post by:
I have some large and complex XML documents. I want to return the whole document with some sections trimmed away. Right now, i read the whole document into some python code, walk the tree, snip...
1
by: Pim75 | last post by:
Hello, I've written a webservice that returns an array. The output of the webservice has to be consumed by a classic asp application. As classic asp can't read the returned array I want the...
8
by: Martin Honnen | last post by:
VK wrote: Mozilla has document.height document.width IE has scrollHeight/scrollWidth, depending on compatMode you will need these properties of document.documentElement or document.body --
0
by: Steve | last post by:
Hi; I was coding my first "light box" effect when I found out that the div that I was using to gray out my page only covered the screen revealed by the brower, not the whole HTML page. I got...
12
by: deegeorge | last post by:
Hi, Suppose i have a notepad file having some contents. i saved it as test.js.(Having th e content Hello) and i used this .js in another .js file. Later if i am updating the contents in test.js file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.