|
I received a nice tutorial today from Builder.com on the subject of formatting pages without using tables, but it raised this question in my mind. In the article the author demonstrates using the float attribute in CSS to make DIVs behave like table columns. He identified each DIV with an ID tag rather than assigning each element a class, as I'm accustomed to doing. What's the difference, and what advantage is there to using IDs instead of Classes for CSS?
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
IDs are appropriate when the CSS performs positioning. Otherwise, classes are better, because they can be re-used by multiple items.
my blog
|
|
|
|
|
That makes sense - thanks!
I suppose that by combining them, giving each element a different ID and assigning them to classes for common characterstics in the way they're designed to be used.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
I agree with your opinion, but I would like to add that Unique ID styles are not appropriate only for providing positioning. I would express it as such, they should just be used where the HTML element using the unique style is unique within the page.
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Watch out for the DIV Table replacement junk. I have heard that for years, but the problem is that the browsers handle things differently with CSS, DIV and FLOAT, causing some of them to have different appearances. I still use tables to format things that will have more than two columns since it is more reliable method cross browsers.
You want to see something amazing:
http://www.csszengarden.com/[^]
It shows you that there is power, but it also is clear it will come at a price of your time to get things perfect.
Rocky <><
www.HintsAndTips.com - Now with GMail Queue
www.MyQuickPoll.com - 2004 Election poll is #33
www.GotTheAnswerToSpam.com
"We plan for the future, we learn from the past, we live life in the present!"
|
|
|
|
|
That is true, it is definitely a minefield. However, if you really want to get into it, there is some good reading material out there, such as:
* More Eric Meyer on CSS
* CSS Cookbook
These are from people who have worked in the field for a while, and have figured out most of the tricks.
my blog
|
|
|
|
|
I had some code years ago which extented your internet explorer. This added an option to right click anywhere on a page and it would show all the linked images on a page in a new html page, full size.
i.e. you got a page with a thumbnail and that is linked to a images by the image tag. By selecting the option you get to see all of the full size images in a new page.
Very usefull if you have a site thats got a lot of thumbnails that links to the full image
Any help, suggestions?
|
|
|
|
|
i am new to asp, please help
i want to create a link, on clicking this link i want to download a sql query into text file.
i have done this as
/////////////////////////////////////////////////////////////
Response.Buffer = TRUE
Response.AddHeader "Content-Disposition","attachment;filename=text.txt"
Response.ContentType = "text/plain"
sql="select * from product_master"
set rs=con.execute(sql)
do until rs.eof
response.write(rs("product_name"))
response.write(rs("product_id"))
rs.movenext
loop
////////////////////////////////////////////////////////////////////
i want to display data from sql query as
product product_id
T-Shirt 101
Shirt 102
please help to do this. when i click on link it display File download dialog box and filename name "test.asp" instead of "text.txt" and then open in Macromedia Dreamweaver
Please help to do it in write way
Many Many Thank's in advanced
Manoj
|
|
|
|
|
Hi Whizzards!
Require help on the Java application below:
The transaction processing application is to be developed in Java
The application reads a master and a transactions file containing data on
the number of hits received by respective departments in a super-store. The
department hits are generated when people interact with an online Information Kiosk
to find the department location in the super-store.
Specifications
Requirements details for this application are given below:
1. The master file contains data on the total year to date hits received by each
department and has the following format:
3
bbbb17 Shoes
bbbbb9 Toys
bbbb65 Ladies Clothing
(Note: ‘b’ stands for a blank, and the number 3 in the first record of the file
shows the number of departments, numDepts)
2. The transaction file contains data on the hits received on a given day and looks
as follows:
Shoes
Shoes
Toys
Shoes
Ladies Clothing
Toys
Toys
Ladies Clothing
Shoes
Jewellery
3. The user should be able to invoke the application in two ways:
by passing no command-line parameters.
by passing two command-line parameters specifying the input file names, for
example, java Assign1 testMaster.txt testTrans.txt
4. When no parameters are passed, the application would use MASTER.TXT and
TRANS.TXT as default file names for the master and the transaction file
respectively.
5. Once invoked, the application reads the master transaction file and creates an
array of department objects. A department object has two instance variables:
the deptName and the hitsReceivedCounter. In addition, it has methods that
perform the following tasks:
read department data from a master file
get the deptName
get the number of hitsRreceivedCounter
increment the number of hitsReceivedCounter
write department data to a new file
6. Next, the application reads the transaction file and increments the
hitsReceivedCounter of the relevant department objects in the array.
7. Finally, a suitable output stream is opened and the updated objects use it to
write their data to a new file called UPDATED.TXT. Note that this file has
exactly the same format as the master file.
Looking fwd to the code.... thnx in advance...
Golden goose.
|
|
|
|
|
This is not the place to post your homework and look for answers. And we are not wizzards. Noone is. We are just people who try hard to work around our chalenging projects, because we love programming. We like what we are doing...
So please, understand this, trying to be kind by saying "Looking fwd to the code.... thnx in advance..." will just not take you anywhere unless you really try to code it yourself. People are here to help other people in specific queries, not to do other peoples homework...
Not to mention that this is a web development forum. It says: HTML, Javascript and CSS questions.
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
problem:
I'm developing a isapi, and i want to unload it automatically from memory, to make my developing time less painfull (avoid iisreset on every build)
the prob is that i oncheck the "cache ISAPI extentions" , reboot the server, but the isapi remains in memory after called
it worked on IIS5 , but now Im using IIS6 and i cant get it to work.
Thanks
|
|
|
|
|
I'm writing an ASP application which connects to an Access 2003 database. When I try to insert a record, I get the following error:
-2147467259 Operation must use an updateable query.
This is the first time that I get this error, maybe it's got to do with security of access 2003. Not sure. I do not kow why I get this error. I think it is write permissions from IIS. I do not not know what to do.
Cheers
Brendan Vogt
0736506305
|
|
|
|
|
Hi..
I faced this before
seems you need to enable write permission on the folder that contains the mdb file.
|
|
|
|
|
I would like to know as to whether we can reverse engineer ASP code using Rational Rose....if s then which version of Rational Rose supports it..
Thanks
Rashmi
|
|
|
|
|
I need to delete user cookies in my application the same way that clicking on Tools/Internet Options.../Delete Cookies... does in Microsoft Internet Explorer. I've found that if I delete the cookies stored in Documents and Settings\MyUserName\Cookies, Internet Explorer still uses the cookies stored in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files. If I delete these cookies manually through explorer, they are permanently deleted. If I enumerate through all the files and directories in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files,using a DirectoryInfo object I am given various html and image files, but no cookie files? Anybody know how to access and delete these cookies programatically?
|
|
|
|
|
Create a cookie with the name same as the name of the cookie you want to delete and make its expiry date as a past date.
|
|
|
|
|
Really? I'll have to try that and I'll let you know how it goes.
Thank you
|
|
|
|
|
Hi Everybody,
Okay my problem is i need to enumerate all virtual directories and websites on IIS on a windows NT box. Can anybody tell me? I would greatly appreciate it.
P.s. The problem is where r changing servers and they have to know which directories all mapped by ip address because the ip address will change.
Thank You
Da Intern
|
|
|
|
|
|
Yes I tried that, do you have any other ideas. Thanks for the help though...
Da Intern
|
|
|
|
|
Hi,
I am totally to "web programming". I just want to know the best way to transfer data in real time from one computer to another through internet.Can anyone suggest me the starting point for that?
Thanks,
Deepak Samuel.
|
|
|
|
|
Using HTTP???
How do I print my voice mail?
|
|
|
|
|
|
I use the following function to test whether a string is alphanumeric. If it does not contain any of these characters, then it will display an error. Now I have an error with the element because I pressed enter a couple of time, and it doesn't pick it up here? How do I enter the enter character in the function below? I hope you understand. This a valid text Good moring, but when I do the following then there is an error,
Good moring
Good moring
Good moring
function isAlphaNumeric(str)
{
var i;
for(i = 0; i < str.length; i++)
{
if(!( ((str.charAt(i) <= '9') && (str.charAt(i) >= '0')) ||
((str.charAt(i) <= 'z') && (str.charAt(i) >= 'a')) ||
((str.charAt(i) <= 'Z') && (str.charAt(i) >= 'A')) ||
(str.charAt(i) == ' ') || (str.charAt(i) == '-') ||
(str.charAt(i) == 'é') || (str.charAt(i) == 'ë') ||
(str.charAt(i) == 'ê') || (str.charAt(i) == 'ü') ||
(str.charAt(i) == '_') ))
return(false);
}
return(true);
}
Your help and time is appreciated!!!
Thanks
BRENDAN VOGT
|
|
|
|
|
Does checking for a carriage return (char 13) work?
e.g.
if (..... &&(str.CharAt(i) == 13)
store your internet favourites online - www.my-faves.co.uk
|
|
|
|