473,387 Members | 1,520 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,387 software developers and data experts.

Teaching myself CSS w/o tables...

NoPeasHear
What is a <div id="">?

I know what a <div class="">, but I don't understand the other.
Aug 26 '06 #1
3 1440
iam_clint
1,208 Expert 1GB
when you set an id its giving the tag div a unique or special id doesn't really have much todo with css
Aug 26 '06 #2
What is a <div id="">?

- Here you are assigning your "layer" (<div></div>) an ID so that it can be identified later in scripting of your page. This doesn't have much to do with CSS, unless you are goin to dynamically change a 'class' later through scripting.

I know what a <div class="">, but I don't understand the other.

This is where your CSS will come in. You are basically saying "here is a group of layers that will be identified by this className that I choose." You can then use CSS to style this group any way you like.


I hope that helped. Good luck!
Aug 26 '06 #3
Banfa
9,065 Expert Mod 8TB
I quite often use id's with css, for instance the menu div (or layer) on the site I use has an id of Menu. You can access this in CSS using the selector

#Menu

and then you can also access or the sub-elements using the top id to selectively assign your CSS

#Menu a

this works in the same manor to a class

.content

.content a


As a personal preference I start all ids with a capital letter and all classes with a lower case letter.
Aug 26 '06 #4

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

Similar topics

20
by: Mediocre Person | last post by:
Well, after years of teaching grade 12 students c++, I've decided to make a switch to Python. Why? * interactive mode for learning * less fussing with edit - compile - link - run - debug -...
14
by: Gabriel Zachmann | last post by:
This post is not strictly Python-specific, still I would like to learn other university teachers' opinion. Currently, I'm teaching "introduction to OO programming" at the undergrad level. My...
20
by: richk | last post by:
I'm in the process of teaching myself, or shall i say in the process of expanding my knowledge in webdesign. I do have my own site up and I love doing it. Right now I do it as a hobby. I would like...
822
by: Turamnvia Suouriviaskimatta | last post by:
I 'm following various posting in "comp.lang.ada, comp.lang.c++ , comp.realtime, comp.software-eng" groups regarding selection of a programming language of C, C++ or Ada for safety critical...
12
by: Pierre Senellart | last post by:
I am going to teach a basic Web design course (fundamentals of HTML/CSS, plus some basic client-side (JavaScript) and server-side (PHP, perhaps XSLT) scripting). Most of the students do not have...
16
by: msnews.microsoft.com | last post by:
I am teaching C# to my 11 year old child. One challenge is that all the C# books I own and that I have seen in bookstores are full of language that is not easily comprehended by a student at that...
2
by: Michael Powell | last post by:
Hi, I have been teaching myself C# and ASP, i wrote a sign-in and register program to teach myself the use of SQL and databases using C# as the development language. Yesterday my little program...
24
by: Richard Aubin | last post by:
I'm really new to vb.net programming and programming in general. I would like to teach myself on how to program effectively and I have the financial and time resources to do so. Can I anyone...
10
by: Cliff | last post by:
Greetings, I have been trying to teach myself C++ over the past few weeks and have finally came across a problem I could not fix. I made a simple program that prints out a square or rectangle...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.