School 1 is that tables are OK for styling, and it is possible to style this was. I don't do this.
School 2 [the one I belong to] is that you should never use tables for formatting as it loses the flexibility for formatting. Additionally (possibly more importantly) the html tags have a symantic meaning, tables are for tabular data. This reaps other benefits too: a well designed page can be ordered so a screen reader (for the partially sighted/blind) reads in the logical order which isn't always the same as the visual order. I almost (read 99.99%) never put any styling inline in the HTML, I do it all through CSS. See CSS Zen Garden[^] for examples. For each design the only thing that is different is the stylesheet.
IMO you should use the tags for their intended symantic purpose, others do have a different point of view.
That is Sir to you, unless you mean floated . I may be dead ringer for Kate Winslet (see my signature), but in reality I am a whacking great chap, which is why I found the Kate Winslet thing funny as I'm about as far removed from her as you can get (or I would be if I grew a beard)! In any case, please call me Keith or Abu Adam.
Anyhoo in response to your question, no I wouldn't do it that way: I'd put them into nested divs, something like:
//root styling here
div #tree > div
//1st level styling here
div #tree > div > div
//2nd level styling here
The actual styling depends on what you want to do, this might not be the most efficient.
One further thing I'd like to suggest before you procede: take a look at the tutorials here: http://www.w3schools.com/[^] especially "Learn HTML" and "Learn CSS". I get my student to go through these as an introduction to our "Web Programming" course.
One big thing (given the OP's location) is that divs are much better for RTL (or the wrong way round as I insist upon calling it to her indoors ) and for switching in bilingual sites that need LTR <--> RTL.
I am trying to achieve a simple upload of a file and a text parameter from a html form. The html page is deployed on jboss 4.2.3.GA (but the result is the same even if you put it anywhere outside the server, etc. on your C drive). My POST request always seems to be empty. I am executing request in Firefox 4.0 browser. Here is the web page:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<h1>Use the form to call webservice</h1>
<form action="http://localhost:8080/mobileEmailService/service/OEV" method="post" enctype="multipart/form-data">
Picture: <input type="file" name="img"/><br />
Name: <input type="text" name="name"/><br />
<input type="submit"value="Submit" />
I am using HttpFox utility in Firefox to examine my request. The POST data always seems to be empty so the parameters in the servlet are also empty. If i change the enctype="multipart/form-data" to enctype="application/x-www-form-urlencoded" then i can get all parameters, but they are only strings. For name parameter this is ok, but for file i just get the file name string and that is not ok I need a file.
So does anyone has idea how is this accomplished?
I am using jboss RESTeasy web service to read the request. But jboss resteasy webservices are just servlets in my opinion. But any way, the data does not even get into the request. So that is the main problem. The client does not even send it.
I don't know exactly what the plugin you use does with the post data, but remember that a multipart/form-data POST just puts everything in the body of the request sent to the server. So it is possible the plugin you use just doesn't understand this type of form submit.
I just verified using Fiddler and the POST data should be visible just fine as long as you look at the RAW data being sent to the server.
Yes... I've thought also on this solution... but... I guess that this will work only if I use the robots.txt in order to avoid Google & Co. to avoid reading the file in which I have the e-mail address written.
Is that in that way?
I've prepared the form. Then I've prepared the PHP file that is being executed once the user press the submit button. By doing this what I've only done is to put the mail address just in another file. Why is this better?
If you have everything configured properly, search bots should not be able to get at your server-side files. Those server side files render to HTML and that is what the search bots see. If you have your form setup the way I do, the postback that is initiated on the button click causes server code to run that sends the email. The client never sees the email address.
As an example, ASPX files are typically not visible from the client side. They are processed on the server side and the HTML page that results is served to the client. By default, I'm pretty sure IIS does not serve ASPX pages to the client. Kinda like how the web.config is not served to the client.
On one of the webapplications I'm working on we have an option to open a popup for printing pages. This popup first gives you several options followed by a page with a frameset on it. Which is something similar to this:
The weird part I can't figure out is that if I remove the frameset in a test it works and the content of the content-to-print.html page fits on the A4 paper. I changed it to something like this:
I've tried playing with the DOCTYPE from loose to strict as well as removing it all together. The loose and strict did have some positive effect but didn't remove the problem completely.
Now I know that using framesets is old school, but in this case its not that easy to remove them all. That would take to much time and affect to many parts of the web application. So how can I tell IE to print the exact same way when using a frameset as it does with the iframe solution. Is this at all possible.
I've tried setting all the pages that are loaded in the frameset as well as the page containing the frameset to the doctype //W3C//DTD HTML 4.01 Frameset//EN. Something I've also tried is setting all pages to that doctype except for the one being printed and setting that to doctype loose. Non of this helped in the scaling issue unfortunately.
With regards to the CSS styles, I've checked all styles but can't find any that are applied to the frameset itself or any of the other pages that the frameset loads that would stretch the frameset other then the page being printed.
not too sure but have you tried adding a css style tage with media print and foc the table to a certain size? Also a css reset may help remove browser specific layout issues, but you will need to add css after that to make a consistant appearance.
When I must debug weird display issues I sometime use background colors on certain elements to get an idea on how the page is being affect.
I make an inline style rule like
and move it from one block level element at a time. Sometimes you will need to different colors on seperate elements to find the cause. In one case I had a margin rule that was tossing the width of a parent element out of wack....and I think the style for the child was dynamic too...
Anyways, hope that helps!
Last Visit: 31-Dec-99 18:00 Last Update: 25-Jun-22 14:13