CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2003, 03:22 AM
chili-mac chili-mac is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Marina Del Rey, CA
Posts: 6 chili-mac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post CSS FORM Layout, spaces in IE

I'm having trouble positioning my form elements how I want them. The following code shows correctly in Mozilla but in IE, there are spaces around the form elements. How can I get rid of all the spacing?
PHP Code:
<form>
    <
div style="border:1px solid;width:200px;height:20px;"></div>
    <
div style="float:left;border:1px solid;width:100px;height:20px;"></div>
    <
div><input style="border:1px solid;width:100px;height:20px;" /></div>
    <
div style="float:left;border:1px solid;width:100px;height:20px;"></div>
    <
div><input style="border:1px solid;width:100px;height:20px;" /></div>
    <
input type="submit" style="font-size:12px;border:1px solid;width:200px;height:20px;" />
</
form

Take a look at this comparision image:


Thank you!

By the way, I've also tried using a table and was still unable to get rid of all the spacing.

Last edited by chili-mac : December 8th, 2003 at 03:59 AM.

Reply With Quote
  #2  
Old December 8th, 2003, 08:58 AM
Corey Bryant Corey Bryant is offline
Texan at Heart
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Castle Rock, CO
Posts: 312 Corey Bryant User rank is Sergeant (500 - 2000 Reputation Level)Corey Bryant User rank is Sergeant (500 - 2000 Reputation Level)Corey Bryant User rank is Sergeant (500 - 2000 Reputation Level)Corey Bryant User rank is Sergeant (500 - 2000 Reputation Level)Corey Bryant User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 13 h 45 m 40 sec
Reputation Power: 15
Try adding something like:
PHP Code:
 margin:0px

to see if that solves your problem.

Reply With Quote
  #3  
Old December 8th, 2003, 02:08 PM
chili-mac chili-mac is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Marina Del Rey, CA
Posts: 6 chili-mac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

Thanks, I have tried that. It doesn't help.

Anyone else have an idea?

Reply With Quote
  #4  
Old December 8th, 2003, 02:34 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,914 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 13 h 45 m 8 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
This may be a stupid idea, but have your tried removing whitespace?:

PHP Code:
<form>

    <
div style="border:1px solid;width:200px;height:20px;"></div>
    <
div style="float:left;border:1px solid;width:100px;height:20px;"></div><div><input style="border:1px solid;width:100px;height:20px;" /></div>
    <
div style="float:left;border:1px solid;width:100px;height:20px;"></div><div><input style="border:1px solid;width:100px;height:20px;" /></div>
    <
input type="submit" style="font-size:12px;border:1px solid;width:200px;height:20px;" />

</
form


Or having the second part of each line relative to the first?
__________________
Cheers,

Jamie

# mdb4u | mobile movie database] | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Reply With Quote
  #5  
Old December 8th, 2003, 02:41 PM
chili-mac chili-mac is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Marina Del Rey, CA
Posts: 6 chili-mac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, I have seen that fix problems in the past, but doesn't do anything for this.

Thanks for the ideas...anyone else?

Reply With Quote
  #6  
Old December 9th, 2003, 01:36 AM
Arden's Avatar
Arden Arden is offline
HTML/CSS/Photoshop maven
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: CA
Posts: 184 Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Arden
Hey, it was a stupid question!

You have two unformatted <div> tags in there surrounding your <input> tags. Move the style to the <div> tags and see what it does.

Reply With Quote
  #7  
Old December 9th, 2003, 03:15 PM
chili-mac chili-mac is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Marina Del Rey, CA
Posts: 6 chili-mac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well that does seem like an obvious answer that would work, but theoretically the div should conform to it's contents...right? Anyway, in practice it doesn't work either. I'm really starting to think this is impossible to do, but I know I'm missing something. I've even taken out the input tags an still get the same layout. I've tried just about everything.

If anyone can post a solution, I'd be very grateful.

Thanks for the replies.

Reply With Quote
  #8  
Old January 13th, 2004, 05:57 PM
guest guest is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 163 guest Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 10 h 1 m 44 sec
Reputation Power: 0
Try this

Use a table, but keep the FORM tag outside of the TD tags. For some blasted reason, the FORM tag adds some kind of linebreak which messes up some vertical formatting. The trick is that keeping the code outside of the TD tags to define a cell's contents removes that irritating linebreak.

Reply With Quote
  #9  
Old January 15th, 2004, 04:13 AM
MostDef's Avatar
MostDef MostDef is offline
st0nEd c0deR
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Manchester, England
Posts: 190 MostDef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 45 m 49 sec
Reputation Power: 6
!

Hey

Most bowsers, although compliant with css and css2 etc, will rnder the same page using the same css in a different way, something to do with counting the pixels if memory serves.

Sounds like what you need is a script to detect the browser version and adjust the css automatically!

E.G.

<-- Begin JavaScript -->
function OpMoz() {

// Detect the browser name
browsername=navigator.appName;
if (browsername.indexOf("Netscape")!=-1) {browsername="NS"}
else
{if (browsername.indexOf("Microsoft")!=-1) {browsername="MSIE"}
else
if (browsername.indexOf("Opera")!=-1) {browsername="opera"}
else {browsername="N/A"}};

// Detect the version
browserversion="0";
if (navigator.appVersion.indexOf("2.")!=-1) {browserversion="2"};
if (navigator.appVersion.indexOf("3.")!=-1) {browserversion="3"};
if (navigator.appVersion.indexOf("4.")!=-1) {browserversion="4"};
if (navigator.appVersion.indexOf("5.")!=-1) {browserversion="5"};
if (navigator.appVersion.indexOf("6.")!=-1) {browserversion="6"};

// Detect and add code to the header part of the
// XHTML document.

if (browsername=="NS") {document.write("<style>#right \{position: absolute;right: 0px;top: 80px;width: 300px;background-color: #EEE;border: 1px solid #CCCCCC;\}<\/style>")};
if (browsername=="MSIE"){
if (browserversion<4){document.write("Update your Browser Please.")}
else {document.write("")}}
if (browsername=="opera") {document.write("<style>#right \{position: absolute;right: 8px;top: 89px;width: 300px;background-color: #EEE;border: 1px solid #CCCCCC;\}<\/style>")}
if (browsername=="N/A") {document.write("")};

}
<-- End JavaScript -->



just mess about with the code, so the css properties are controlledby this script once the browser has been detected!

script source: http://www.risingdragon.org.uk

Hope this helps!
MostDef
__________________
All is not what it seems, and it seems that this is not all!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS FORM Layout


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT