|
econner wrote: What are the advantages of moving from the traditional table layout style of a web page to the new CSS layout?
:: You can make pages with half the code (or less), which gives faster downloads.
:: You can separate the markup from the layout, which simplifies construction and maintanence.
:: Correct usage of html tags makes search engines index your pages better, and makes it possible for disabled persons to access your site. It also makes your page usable with any browser, ancient or future, even if they don't display it correctly.
econner wrote: Any disadvantages or reasons not to move to CSS?
Table layouts works better with browsers that partially, and inaccurately, support css, like Netscape 4 and contemporaries.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks.
I will take a closer look at CSS. Is Visual Studio 2005 Web Edition editor a good place to start? Or, are there any other editors you would suggest?
|
|
|
|
|
Visual Studio 2005 works fine to make CSS layouts.
I suggest that you use Firefox to test the designs while working. Visual Studio uses the same rendering engine as Internet Explorer for previews, and IE 6 has some rendering bugs.
---
b { font-weight: normal; }
|
|
|
|
|
Always one to look for an argument, me:
Guffa wrote: :: You can make pages with half the code (or less), which gives faster downloads.
Oh yeah? You can markup a basic header / 3-coloumn / footer page layout using HTML tables in a dozen lines of code. Try doing that in CSS! Au contraire, you can find whole websites devoted to this one signle topic. Or problem, to be more accurate. And the solutions they come up with involve a lot of code.
Guffa wrote: :: You can separate the markup from the layout, which simplifies construction and maintanence.
Oh yeah? How easy is td bgcolor=#cccccc compared to td class=fred now then where is my definition of fred, oh yeas it's in xyz.css which is in abc folder right got that now then where the hell is my fred class... somewhere down at line 533 I think...
Guffa wrote: :: Correct usage of html tags makes search engines index your pages better, and makes it possible for disabled persons to access your site. It also makes your page usable with any browser, ancient or future, even if they don't display it correctly.
OK, I'll give you that - but emphasize the words "Correct usage" - otherwise your page will look a right mess. And don't forget to write half a dozen CSS pages for all the different browsers out there....
But - and it's a big butt (no that's not a typo) - fact is CSS is the way it's going so you - and I - are just going to have to get used to it. And yes, of course I am being a bit disingenuous, because a site laid out with CSS will be much easier to make global changes to; eg, once your client decides they want to re-brand themselves and use orange throughout instead of blue, you'll be glad you used CSS. Site maintenance is easier if you've used CSS, but you need to be organised, and one trouble with CSS is it's inherent lack of internal order. USE COMMENTS EXTENSIVELY in your CSS. The very fact that your markup and your CSS are seperated means you have to keep track of what relates to what in some other way.
Like all web-technologies CSS suffers from the fact that every browser does things differently and while the guardians at W3C like to think they're the arbiters of standards (did I ever vote for them?) fact is we already had a standard - it was called HTML.
Nevermind - hey, I LOVE CSS/XHTML XXXX (Is there an arse-lick emoticon anywhere?) I use it all the time now. (Really, I do.)
Good luck
P
-- modified at 17:37 Monday 22nd May, 2006
|
|
|
|
|
Phil Uribe wrote: Oh yeah? You can markup a basic header / 3-coloumn / footer page layout using HTML tables in a dozen lines of code. Try doing that in CSS! Au contraire, you can find whole websites devoted to this one signle topic. Or problem, to be more accurate. And the solutions they come up with involve a lot of code.
That specific example may be more difficult to accomplish using floating elements, but just because there are people that are confused about it doesn't prove that it can't be done.
Phil Uribe wrote: Oh yeah? How easy is td bgcolor=#cccccc compared to td class=fred now then where is my definition of fred, oh yeas it's in xyz.css which is in abc folder right got that now then where the hell is my fred class... somewhere down at line 533 I think...
Yes, if you look at one single element and want to find out it's properties, it's easier if the properties are in the element itself. That will be very helpful when you want to change the background color of all ten thousand table cells that are scattered across a hundred web pages...
Phil Uribe wrote: And don't forget to write half a dozen CSS pages for all the different browsers out there....
Or you can use methods works in all modern browsers, and write a single CSS file. It takes a bit of learning-by-doing to get the hang of what you have to do to make it work with the quirks in IE, though.
Phil Uribe wrote: The very fact that your markup and your CSS are seperated means you have to keep track of what relates to what in some other way.
True. Descriptive naming of elements and classes play a large role in that. "#Links .Header" works much better than ".blkbldhdr".
Phil Uribe wrote: (Is there an arse-lick emoticon anywhere?)
:P3
---
b { font-weight: normal; }
|
|
|
|
|
I might be a little late, but here are some good resources (might have to dig a little):
http://www.csszengarden.com/[^]
http://www.alistapart.com/topics/code/css/[^]
I'm a huge TABLE fan, it just makes sense to me (rows and columns) . CSS can drive you nuts when you cross browsers. I like CSS, but it's just another thing you have to learn, and like every technology, once you learn all the tricks and workarounds, there will be something new to learn the tricks and workarounds of (endless loop).
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Steve Echols wrote: CSS can drive you nuts when you cross browsers.
True, but tables are far worse in that aspect. How tables are rendered are up to the specific browser to decide, so they work differently in every browser. To make tables behave the same across browsers, you have to totally defeat the default behaviour of the tables.
---
b { font-weight: normal; }
|
|
|
|
|
I've mainly tested in firefox and ie, but TABLES have always seemed to be rock solid in both browsers for dynamic layout, width=100% type stuff (although height=100% has thrown me for some loops). Even if I have to defeat the default behavior, they still work the same in both browsers.
I've ran into problems when I mix DIV with tables, specifically with IE and scrollbars when using overflow: auto.
And the debate rages on....
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Steve Echols wrote: (although height=100% has thrown me for some loops)
That is because there is no height attribute for tables. You need to use CSS to set the height of a table.
---
b { font-weight: normal; }
|
|
|
|
|
i want to create a button in html as "print".
how can i enable the printing like printing from the browser it self?
Militiaware
Faris Madi
|
|
|
|
|
<a href="JavaScript:self.print()">Print</a>
okay this is a link, transform it yourself to a button or place an image in the tag.
|
|
|
|
|
Hi.
How can I close right click on flash files, In code or in fla file itself ?
I have used flash player component.
Best wishes
|
|
|
|
|
Hi,
How can i print a praticular div region using javascript on the claick of a button.
Will it show a print dialog or will it directly print.
Thanks in advance.
Deepak Surana
|
|
|
|
|
It will always show a print dialog, i don't think it's possible to print directly to a printer. And I guess you best place the div block in a new window (pop up dialog or something) and print that page.
|
|
|
|
|
Ok thats a fair suggestion. thanks.
Can you plz tell me how to print a perticular div region when i click on the button.
|
|
|
|
|
Hi,
There is a problem with the javascript below. I cant find where the problem is.
I have to draw a rectangle by dragging the mouse. Also, when the mouse is first clicked before dragging and released after dragging, the mouse coordinates will be displayed.
I had 2 seperate scripts. One which draws the rectangle when the mouse is dragged and the other displays mouse coordinates when the mouse is clicked and released. Both can work individually but when I combine them, there is a problem. The rectangle can be drawn but the mouse coordinates are not displayed.
<script type="text/JavaScript">
var d;var posx;var posy;var initx=false;var inity=false;var click = 0;
function getMouse(obj,e){
posx=0;posy=0;
var ev=(!e)?window.event:e;//Moz:IE
if (ev.pageX){//Moz
posx=ev.pageX+window.pageXOffset;
posy=ev.pageY+window.pageYOffset;
}
else if(ev.clientX){//IE
posx=ev.clientX+document.body.scrollLeft;
posy=ev.clientY+document.body.scrollTop;
}
else{return false}//old browsers
var target = (e && e.target) || (event && event.srcElement);
if(target.id=='Canvas'){
obj.onmousedown=function(){
initx=posx; inity=posy;
d = document.createElement('div');
d.className='square'
d.style.left=initx+'px';d.style.top=inity+'px';
document.getElementsByTagName('body')[0].appendChild(d)
if(click == 0){
click = 1;
document.getElementByID('xbefore').value=posx;
document.getElementByID('ybefore').value=posy;
}
}
obj.onmouseup=function(){
if(click == 1){
click = 0;
document.getElementByID('xafter').value=posx;
document.getElementByID('yafter').value=posy;
}
initx=false;inity=false;
}
if(initx){
d.style.width=Math.abs(posx-initx)+'px';d.style.height=Math.abs(posy-inity)+'px';
d.style.left=posx-initx<0?posx+'px':initx+'px';
d.style.top=posy-inity<0?posy+'px':inity+'px';
}
}
else{return false}
}
document.onmousemove=function(event){
getMouse(document,event);
}
Before
X:
Y:
After:
X:
Y:
Could anyone help to see where the problem is?
I can post the 2 individual working scripts if needed
-- modified at 22:47 Sunday 21st May, 2006
|
|
|
|
|
Hi Friends,
As we got SiteMapPath control in ASP.NET.
Does any one know how to perform this functionality in classical ASP?
any code or link will be appriciated.
Naveed Kamboh
-- modified at 9:37 Monday 22nd May, 2006
|
|
|
|
|
Not really sure what you want, but perhaps the Request.Servervariables collection..? Maybe the following page will help:
cheers
P
<%@ LANGUAGE=VBSCRIPT %>
<HTML>
<HEAD>
<TITLE>Server Variables</TITLE>
</HEAD>
<BODY bgcolor="white">
<table border=4 width=700>
<tr>
<td width=100 bgcolor="black"><font color="white">
<b>Server Variable</b></font></td>
<td bgcolor="black"><font color="white">
<b>Value of Server Variable</b></font></td>
</tr>
<%
Dim LoopCount
LoopCount = 0
For Each ServerVariable In Request.ServerVariables
LoopCount = LoopCount + 1
If LoopCount Mod 2 = 0 Then
%>
<tr><td bgcolor="ffddbb">
<%= ServerVariable %>
</td>
<td bgcolor="ffddbb">
<%= Request.ServerVariables(ServerVariable) %>
</td></tr>
<% Else %>
<tr><td bgcolor="e3ffb0">
<%= ServerVariable %>
</td>
<td bgcolor="e3ffb0">
<%= Request.ServerVariables(ServerVariable) %>
</td></tr>
<%
End If
Next
%>
</table>
</BODY>
</HTML>
|
|
|
|
|
Hi Phil,
I want to show path on web site this.
Home> category1 > product5
It means user clicked on category1 and product5 of cateogry1.
Now if user will click on home or category1 he can go to respective pages.
any idea sir with classical asp.?
Naveed Kamboh
|
|
|
|
|
I'm writing a webservice to look up the information of Person stored in file Data.xml. This xml file is stored in App_data folder. The following source code to read xml file:
XmlDocument doc = new XmlDocument();
Boolean b = true;
try
{
doc.Load("..\\App_Data\\Data.xml");
XmlElement xmlRoot = doc.DocumentElement;
string xpath = "/dataroot/Data";
XmlNodeList node = xmlRoot.SelectNodes(xpath);
int len = node.Count;
for(int i=0; i
|
|
|
|
|
I've downloaded and installed the Visual Web Developer 2005 Express Edition IDE on my desktop. I wanted to take a look at some old backups which I know work in order to ensure my web server (I believe I have to use Cassini which installs with the IDE as I have XP home edition on my desktop) and SQL Server are configured correctly. As I know the asp pages read the SQL database on my laptop I know the code is correct and I must look at configuration.
I have yet to locate my ASP.NET backups (we've just emigrated), but as I need both I thought I may as well start with the ASP pages. However, when I attempt to view them in IE I get the message:
This type of page is not served. <br />
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly
A solution I've found on MSDN says:
"You need to enable ASP support on your server -- this can be done through the IIS Manager, and Web Site Extensions node."
I have never used Cassini before. In fact, in the XP Home control panel I can't even find Cassini, let alone enable ASP support. Has anyone had any experience with Cassini?
Before anyone tells me to go and get decent software perhaps I should explain why I'm forced to work with these tools. Firstly, I have XP Pro and VS 2003 on my laptop. However, as they were loaded on by my last employer I can not use them for the subcontracting projects I'm being offered to do from home. I've been on maternity leave for 1 year since the birth of my son and do not plan to purchase expensive development tools (or even XP Pro) until I see that the people I'll be subcontracting for are genuine and that I am in fact going to be paid rather than scammed. Should the first few projects go well and things continue to look kosher I'll naturally re-evaluate the tools I'm using to build their sites. In the meantime though I need to get this XP Home desktop working in order to build those first sites which I believe with be ASP.NET, some ASP 3.0 and SQL Server sites.
Thanks for any help!
A mum and loving it!
|
|
|
|
|
It is possible the error is due to Cassini WebServer not finding relevant files.
Taken from the Cassini ReadMe file,
Run the web server using 'CassiniWebServer <physical-path> <port> <virtual-path>'.
For example:
CassiniWebServer c:\ 80 /
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thanks Richard,
Unfortunately I'm running the project from VS. aspx files are running great, asp not so great. I'm really starting to pray that these projects I'm going to be given are all going to end up hosted on a .NET server
A mum and loving it!
|
|
|
|
|
Hi Megan,
Running XP Home does create problems as you cannot use IIS as would be installed by XP Pro.
It appears you have to either install XP Pro or use a competitor product such as Apache, which I think will run on XP Home. And that Apache is FREE as in OpenSource.
Visit the following and look for HTTP WebServer (latest version 2.2)
http://apache.org/[^]
As long as you configure the installed Apache properly, it should be able to process the old asp pages. Although I have never used it with aspx.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
hi all,
i have this crazy idea and now its got me stuck. Lets start from the beginning. i have a simple web page mixed with some javascript, but i need some data, lets say from a database of file. To solve this a created a .net web service that will, for arguments sake return "hello world!". Now how do i get it into my web page. The reason i've done it this way is because i can host the asp.net myself but provide only a few hours of coverage, but the web page will be hosted on linux system and will be on all the time.
for example this goes straight to the service, but how do i change it to bring data back and display it
<html>
<body>
<form action="http://localhost/WebService1/Service1.asmx/gethelloworld" method="POST">
<input type="submit" value="Enter"> </input>
</form>
</body>
</html>
this is a sample of the main web page:
<HTML>
<FORM>
<INPUT TYPE="" NAME="name" SIZE=50 MAXLENGTH=40 tabindex="1" id="name">
</form>
<script>
name="How do i get webservice data in here"
document.forms[0].name.value=name
</script>
</HTML>
there is however another way, if i could somehow activate the web service rather than going directly to it, then i could make the service create an xml file and read the data that way!, any suggestions on this would be greatly appreciated.
thanks
|
|
|
|