|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
Spaced out lines in IE fine in firefox.
01-12-2008, 11:01 PM
|
Spaced out lines in IE fine in firefox.
|
Posts: 7
|
I am working on a site and its going good except today I noticed that the when the page is brought up in internet explorer i don't like the space it puts between the lines particularly the buy now button area.. I have tried so many different changes to fix this prolbem and have just wasted my whole evening...
In case you don't have firefox heres a screen shot of how i would like this to look.. http://www.legaldro.com/screenshot.bmp
website page http://www.legaldro.com/chillinxxx2.html
http://www.legaldro.com
and in internet explorer i used version 7.0 It wants to put line spacing in where i don't want it...
Your help is soooo greatly appreciated !!
CHAD
Last edited by Legaldro; 01-13-2008 at 04:55 PM..
|
|
|
|
01-12-2008, 11:39 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 52
Name: Dustin
|
I've had this exact problem before and I came to realize that it was the <form> tag that causes it. IE is just weird like that. I never did find a way to fix it. I'll search for it some more, if you find out how to fix the problem let me know if you don't mind.
|
|
|
|
01-12-2008, 11:49 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 52
Name: Dustin
|
Found something pretty quickly. The site I located said that the reason for the extra white space is because when the <form> tag is within a <TD> tag certain browsers will read it like a <p> tag. I tried this out myself and it treated it like a <p> tag regardless of whether it was in a <TD> or not. The way around it is <form style="margin: 0">. That's what worked for me. The site I found also said you can use <form style="display:inline"> but I didn't try that one. Hope this works for you.
|
|
|
|
01-13-2008, 12:08 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 30
Location: Illinois
|
TributeK is correct...the <form> tag is a block level element in css so the default behavior is to add a line space above and below the tag but altering the default behavior using
Code:
style="display:inline"
will change your form tag to an inline element.
|
|
|
|
01-13-2008, 12:18 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
I've always just added this to my CSS:
HTML Code:
<style>
form {
margin:0px;
}
</style>
Note, you should always add the units of measurement.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 01:14 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 52
Name: Dustin
|
Quote:
Originally Posted by JeremyMiller
I've always just added this to my CSS:
HTML Code:
<style>
form {
margin:0px;
}
</style>
Note, you should always add the units of measurement.
|
Doh, I've always suffered from extreme programming laziness and just plain bad habits. Good advice.
|
|
|
|
01-13-2008, 04:32 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 12
Name: David
|
Wow, that's some really kick-butt stuff, man. I had this problem too, and the way I always dealt with it was to place as much as I could in the same form and then just deal with the spacing at the bottom. I've been handling it this way for so long that I just plain lost interest in finding an answer. And after all this time, it finds me...
Thanks so much.
Last edited by The Lion; 01-13-2008 at 04:34 AM..
|
|
|
|
01-13-2008, 05:29 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 12
Name: Stefan Petrovic
Location: Rovinj, Croatia
|
Is it legal? 
|
|
|
|
01-13-2008, 05:32 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,584
Location: Kokkola, Finland
|
"Note, you should always add the units of measurement." but you don't have to if it's zero, Jeremy
|
|
|
|
01-13-2008, 11:37 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
Quote:
Originally Posted by davemies
"Note, you should always add the units of measurement." but you don't have to if it's zero, Jeremy
|
Note that I said "should" and not "must." It's a good practice to always use units, however. http://www.quirksmode.org/css/quirksmode.html#t13
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 11:48 AM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,584
Location: Kokkola, Finland
|
hmm but your 'should' implies that it wouldn't be ok to omit it for zero, when it's perfectly legitimate to do so.
|
|
|
|
01-13-2008, 12:18 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
Quote:
Originally Posted by davemies
hmm but your 'should' implies that it wouldn't be ok to omit it for zero, when it's perfectly legitimate to do so.
|
I'm not sure where you're trying to go with the semantics of this. Yes, you can ignore it. You can also never comment your code -- that's as perfectly legitimate, right? Is either a good idea? In my opinion, no.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 01:27 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 19
Name: Harry
|
Not sure if the site to good but using units should ( hopefully ) fix the problem
|
|
|
|
01-13-2008, 02:45 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,584
Location: Kokkola, Finland
|
"Yes, you can ignore it. You can also never comment your code -- that's as perfectly legitimate, right? Is either a good idea? In my opinion, no."
not the same thing: commenting your code is useful but using units on a value of zero is purely a matter of personal preference.
my point is just that: that you can choose to use '0' with units or without. why is not a good idea to not use units with zero in your opinion?
|
|
|
|
01-13-2008, 04:02 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
@davemies: Let's just agree to disagree on this one. It's optional either way and we both have different preferences. No harm, no foul.
Have a great day!
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 04:29 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 7
|
Thank you so much jermey the method you told me about the ccs worked great. Yesterday i tried the inline but I couldn't get it to work, where do you use that one, in the form? also y'll talking about taking out the comments to clean up the code? (Think i could clean up the ccs too but not sure what to remove)
ps. yeah its legal wouldn't touch it otherwise  not for the faint hearted tho anyway I'm really happy I got you all to help me. Its been years since i did html etc....
Thanks,
chad
Last edited by Legaldro; 01-13-2008 at 04:33 PM..
|
|
|
|
01-13-2008, 04:35 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
Quote:
Originally Posted by Legaldro
...where do you use that one, in the form?
|
I use it in the stylesheet itself so that it applies to all forms -- I've never needed my forms to have spacing.
Quote:
Originally Posted by Legaldro
also y'll talking about taking out the comments to clean up the code?
|
I'm not. Commenting is a good thing. Since it doesn't make the code work, it's unnecessary but it's still a good idea to add in the comments. The rest of the debate was on why one of us prefers adding in units while the other does not and there my mathematics comes into play -- no units means a bad grade, but it's totally preferential. I'm just not worried about saving a couple of bytes of information and 2 keystrokes, so I add them in as that keeps my code consistent.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 04:54 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 7
|
Like units where the value is 0? sorry if i'm lost...
|
|
|
|
01-13-2008, 04:57 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
|
Actually, "0" has no units of measurement. 0 what? 0 apples? 0 oranges? 0 ems? 0 px? Not all zeroes are equal. Sometimes browsers can figure out what you mean because you're obviously, for example, not talking about apples in this case. I prefer, however, to be specific and declare 0px or 0em to indicate that it's zero units of space.
__________________
Jeremy Miller
Please login or register to view this content. Registration is FREE
|
|
|
|
01-13-2008, 05:02 PM
|
Re: Spaced out lines in IE fine in firefox.
|
Posts: 7
|
Yes, I do the same too ... just makes me feal better bout it 
|
|
|
|
|
« Reply to Spaced out lines in IE fine in firefox.
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|