Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-07-2012, 05:00 AM   PM User | #1
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Alignment in the Evil Browser (I.E. I.E.)

Hi. Hope you enjoyed the pun.

Anyway,

My website at www.ironwhisk.com is showing up strangely in IE.
I was able to fix most things by creating a seperate stylesheet but two relatively simple problems remain:

1) There is horizontal scrolling. When I reduce the wrap div width, the scrolling decreases. After what I have now though, it ruins the layout. How can I get rid of this scrolling? Why is it so wide..

2) The ad at the top is not aligned with the text. When I change the adtop div margin, nothing happens.

Please advise!

Thanks,

Ilan
Ilan is offline   Reply With Quote
Old 09-07-2012, 06:09 AM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
Delete on line 815 of style.css:

Code:
#adtop {
      float: right !important;
      margin-left: 150px !important;
}
and replace with:
Code:
#adtop {
      margin-left: 20px;
}
The horizontal scroll in IE is caused by this ad.
Sammy12 is offline   Reply With Quote
Old 09-07-2012, 09:09 PM   PM User | #3
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Hi Sammy,

Thanks a bunch for your suggestion - it totally fixed the ad problem.
I'm still having trouble with the scrolling though. I tried decreasing the wrap div but it isn't working.

Thank you!
Ilan is offline   Reply With Quote
Old 09-07-2012, 09:33 PM   PM User | #4
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Thanks, that's very helpful and worked great.

Quick question though, for the footer it's not aligned to the right of the secondary sidebar in IE like it is in chrome/mozilla.
I can't just add padding since it will look different everywhere. Do you have a suggestion on how to fix it?
Ilan is offline   Reply With Quote
Old 09-07-2012, 09:36 PM   PM User | #5
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
sec I'm just going to try to fix this layout

Take out the:
Code:
html, body {
     width: 100%;
     overflow-x: hidden;
}
And add:
Code:
#wrap {
     width: 1000px !important;
     margin: 0 auto !important;
     padding: 0 !important;
     position: relative;
}
#sidebar-primary {
     position: static !important;
     margin: 0 !important;
     float: left !important;
}
#main {
     float: left !important;
     width: 738px !important;
     margin-bottom: 50px;
     overflow: hidden; *zoom: 1;
}
#adtop {
     margin-left: 20px !important;
     margin-bottom: 40px !important;
}
#content {
     width: 495px !important;
     margin: 0 !important;
     padding: 0 20px !important;
}
#footer-container {
     clear: both !important;
     overflow: hidden; *zoom: 1;
     margin: 20px 0;
}

Last edited by Sammy12; 09-07-2012 at 10:40 PM..
Sammy12 is offline   Reply With Quote
Old 09-07-2012, 10:01 PM   PM User | #6
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Oh wow, that works great!
Fixed everything but the footer, should I just use margin for that then?

Should I add that code to my other stylesheet?
Ilan is offline   Reply With Quote
Old 09-07-2012, 10:24 PM   PM User | #7
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Hi,

Thanks I added the code but it messed up all the formatting.
Ilan is offline   Reply With Quote
Old 09-07-2012, 11:20 PM   PM User | #8
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
So are you suggesting I add it to the head of the page instead of in the stylesheet?
What's the difference?
Ilan is offline   Reply With Quote
Old 09-08-2012, 12:37 AM   PM User | #9
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Did I somehow add the code incorrectly then? It looks all messed up in IE.
Ilan is offline   Reply With Quote
Old 09-08-2012, 12:43 AM   PM User | #10
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
I did add it. It's at the bottom of the stylesheet.
Am I supposed to replace the code at the top currently there describing main, wrap, etc. or just paste this code at the bottom?
Ilan is offline   Reply With Quote
Old 09-08-2012, 02:48 AM   PM User | #11
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
I have a seperate style sheet for IE.
all-ie-only.css and I added it in there.

That ie style sheet is simply the other one copied and pasted with a few changes because of ie's weird formatting
Ilan is offline   Reply With Quote
Old 09-08-2012, 04:28 AM   PM User | #12
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Alright, added the code. This happened:

1) The entire website was shifted up
2) The sidebar was shifted down
3) It did not affect IE at all (it was not in the IE stylesheet so I'm not sure why it would).

I'm leaving it up like this for now so you can see.

Thanks
Ilan is offline   Reply With Quote
Old 09-08-2012, 04:37 AM   PM User | #13
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Here is a before and after screen shot
Attached Thumbnails
Click image for larger version

Name:	ba.jpg
Views:	18
Size:	44.7 KB
ID:	11531  
Ilan is offline   Reply With Quote
Old 09-08-2012, 05:01 AM   PM User | #14
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Hi,

Thanks. That works.

These changes didn't affect IE at all though (the footer is still not aligned).
Ilan is offline   Reply With Quote
Old 09-08-2012, 04:57 PM   PM User | #15
Ilan
New Coder

 
Join Date: Aug 2012
Posts: 87
Thanks: 4
Thanked 0 Times in 0 Posts
Ilan is an unknown quantity at this point
Hi Sammy,

Just to clarify the problem is in IE not in any other browser.
What code should I use in IE?
Ilan is offline   Reply With Quote
Reply

Bookmarks

Tags
alignment, ari, internet explorer, wordpress

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:34 AM.


Advertisement
Log in to turn off these ads.