PDA

View Full Version : form dispalying different in ie to ff


monkeymedia
12-08-2010, 08:50 AM
http://test.redwebhosting.co.uk/avagarosa/guest_book.php

it's the 'please leave a message box' bit at the bottom that's being weird. in ff it totally ignores the ccs rules that apply to 'triplecol' but in ie its perfect (well, needs some tweaking but its working)

any ideas?

Ricky55
12-08-2010, 11:18 AM
To target a text area with css you don't need a class just use.

form textarea {

}

to target the input field use

form input[type="text"] {

}

Are you using a CSS frame work to create these pages?

triplecol sounds like frame work terminology.

Frameworks can be useful but sometimes create messy code. If at all possible you're best establishing your own frame work over time. A method that suits you.

Cheers

monkeymedia
12-08-2010, 12:50 PM
sorry I dont know what you mean by a css framework

triplecol is a name I chose for a css class. within triplecol there are css rules for h2, p etc etc

the <p> tags have a background image specidied. I did try wrapping the form in p tags with no joy. I also tried specifying p as the class for the form but it was unavailable in the drop down list so guess its not a good idea.

Corrosive
12-08-2010, 01:18 PM
<p> means paragraph. Why wrap a form in p tags??

monkeymedia
12-08-2010, 01:50 PM
because the p tag css contains the spacing that needed plus the background image.

I also tried duplicating the p css rule and calling it .triplecol form but that didn work either.

I'm not saying either is right, I'm just telling you what I tried

Corrosive
12-08-2010, 02:05 PM
OK, but you need to understand what specific pre-defined tags are for. I used to do the same as you and wrap stuff in all sorts of the wrong tags because I already had a rule I wanted to re-use. That doesn't lead to a scemantically correct page.

monkeymedia
12-08-2010, 02:24 PM
I understand a lot more than I did 3 months ago, but to me, and the way this page is built, having ".triplecol form" as a css rule inside a div with the class ".triplecol" looks like it should have worked and would be the 'right' way of doing it, so why didn't it work?

DWcourse
12-08-2010, 02:37 PM
I suspect you've got some leftover "junk" code in there that's breaking things. For instance what is this:

<table class='newsList'>

I don't see the rest of that table anywhere.

monkeymedia
12-08-2010, 02:53 PM
you were bang on with that. deleted the table bit and it now works.

cheers everyone.

so, making a form css rule was the right thing to do then? or not?

DWcourse
12-08-2010, 03:01 PM
you were bang on with that. deleted the table bit and it now works.

cheers everyone.

so, making a form css rule was the right thing to do then? or not?

It was fine.

gentleone
12-08-2010, 03:51 PM
you were bang on with that. deleted the table bit and it now works.

Lesson learned today: Make sure you always validate your page first before starting to look into conflicting CSS rules. ;)
http://validator.w3.org/

If you would have done that, that table error would have show up after validating.

DWcourse
12-08-2010, 03:57 PM
One of the problems with CSS is that we naturally assume our problem is in the CSS and concentrate there and overlook the HTML. Some of the trickiest issues I've had to deal with involve things like unclosed HTML tags or and extra closing HTML tag. It's especially tricky since some browsers are more forgiving of HTML errors than others.

Corrosive
12-08-2010, 04:19 PM
One of the problems with CSS is that we naturally assume our problem is in the CSS and concentrate there and overlook the HTML. Some of the trickiest issues I've had to deal with involve things like unclosed HTML tags or and extra closing HTML tag. It's especially tricky since some browsers are more forgiving of HTML errors than others.

This is why I much prefer the hand-code approach. I don't tend to find these issues.

gentleone
12-08-2010, 04:35 PM
This is why I much prefer the hand-code approach. I don't tend to find these issues.
Indeed! Deleting elements in design view can be tricky. You think you've selected the whole table to delete, but you didn't.

DWcourse
12-08-2010, 06:05 PM
Indeed! Deleting elements in design view can be tricky. You think you've selected the whole table to delete, but you didn't.

Realistically, it's impossible to delete all of a table except the opening html <table> tag in design view. I'm almost certain you'd have to do it by editing the code.

BTW, I'm willing to be proved wrong but I'd need a demo.

In any case, I know from experience that editing the code doesn't guarantee that you won't make this kind of error. I do it all the time. :roll:

gentleone
12-08-2010, 06:34 PM
Realistically, it's impossible to delete all of a table except the opening html <table> tag in design view. I'm almost certain you'd have to do it by editing the code.

BTW, I'm willing to be proved wrong but I'd need a demo.

In any case, I know from experience that editing the code doesn't guarantee that you won't make this kind of error. I do it all the time. :roll:
I did a little test with a table on a site I'm working on. If you select the table in design view and just press delete, you only delete the content of the table. If you press Ctrl x or Cmnd x then you delete the whole table, so no table traces anymore in the code.

So I was wrong about that and perhaps he just did it in code view, but forgot that last table bit :)

I remember in my old days when I was updating in design view my 'table-based-inline-styled' site that was made by a friend back then. I deleted text just with the 'delete' key and replaced it with new text, but after a couple of months I've noticed my site became very, very, very slow. The reason for that was that there were tons (really tons) of inline open and closed font tags that were not deleted from the code... Oh well... we all had to start somewhere and I believe from that moment I started to work in split view :)

DWcourse
12-08-2010, 06:59 PM
I remember in my old days when I was updating in design view my 'table-based-inline-styled' site that was made by a friend back then. I deleted text just with the 'delete' key and replaced it with new text, but after a couple of months I've noticed my site became very, very, very slow. The reason for that was that there were tons (really tons) of inline open and closed font tags that were not deleted from the code... Oh well... we all had to start somewhere and I believe from that moment I started to work in split view :)

Ahh, the "good" old days. Actually they kind of sucked. Fortunately, it's easy to get rid of those font tags (which I still run into) nowdays: http://www.dwcourse.com/dreamweaver/deleting-html-tags.php

gentleone
12-08-2010, 07:41 PM
...those font tags (which I still run into)...
I think they will stick with us for another decade or so :)

monkeymedia
12-09-2010, 09:38 AM
hey all

to settle this, I did indeed edit the code manually and managed to leave some behind. years ago when I first taught myself html (when it was totally different. tables and frames yes please!) I did make my sites in a text editor (coffeecup rings a bell?) so I do tend to edit the code more than design view, but for creating items I hardly ever manually write them.

DWcourse is totally right, immediately there is a problem I start looking at the css

monkeymedia
12-09-2010, 09:39 AM
Lesson learned today: Make sure you always validate your page first before starting to look into conflicting CSS rules. ;)
http://validator.w3.org/

If you would have done that, that table error would have show up after validating.

I have a question about this, how important is it to get rid of every single error? just messing about last night I tested loads of rnadom pages (mine and others) and they all had in the region of 25 problems.

Corrosive
12-09-2010, 09:45 AM
I have a question about this, how important is it to get rid of every single error? just messing about last night I tested loads of rnadom pages (mine and others) and they all had in the region of 25 problems.

It depends if they are causing display errors or not. 100% valid code is a good guide and validator is a great debugging tool but you can't get every error every time. Part of learning is distinguishing between errors you can live with and the ones you can't.

monkeymedia
12-09-2010, 10:10 AM
ok thank you.

DWcourse
12-09-2010, 12:43 PM
Part of learning is distinguishing between errors you can live with and the ones you can't.

That's how my wife manages to stay married to me.

Corrosive
12-09-2010, 01:43 PM
That's how my wife manages to stay married to me.

You are not alone mate, that's how I stay married as well :)