There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
CSS nightmare in IE!


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
DrP's Avatar
DrP DrP is offline
Senior Member with 481 posts.
 
Join Date: Jul 2005
Location: UK
Experience: What's a compoota?
04-Dec-2005, 02:13 PM #1
CSS nightmare in IE!
Hi
If you check out the site I'm building: http://www.cliveportman.co.uk/2nd_sc...te/index3.html
you'll see that it looks fine in Firefox, but the buttons are all over the place in IE.
I've put the CSS in the html file so you can see it.
Does anyone have any ideas? I'm baffled as to what it could be.
Please help!

Solved it! needed to change width of sidebar to 190px
__________________
Clive

Last edited by DrP : 04-Dec-2005 03:02 PM. Reason: Solved!
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
04-Dec-2005, 07:43 PM #2
Increasing the width of the navcontainer to ~200px should fix things at least partially. The links are wrapping to the next line in IE because there's not enough room for them to stay on the same line. You may have to explicitly set both padding and margin for everything to whip IE in shape.

After where you define the navcontainer style, add this:

Code:
* html #navcontainer { /* for ie only */
    width: 200px;
}
Then, adjust the width from 200px till it looks how you want it in IE.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
DrP's Avatar
DrP DrP is offline
Senior Member with 481 posts.
 
Join Date: Jul 2005
Location: UK
Experience: What's a compoota?
06-Dec-2005, 06:45 PM #3
Thanks for that. I managed to get it down to 192px, but it seems to work without the addition of your CSS. What is the asterisk (in ur CSS) for btw?
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
06-Dec-2005, 06:57 PM #4
The * is a selector. It matches all elements. It's called the "universal selector".

Code:
* {
    bakckground: #ccc;
}
That makes all elements have a gray background.

Opera and Firefox for example support this well.

Now, IE supports something screwy.

Code:
* html {
    background: #ccc;
}
That says to make the background gray for any html element that's a descendant of any other element. That won't work in compliant browsers because html is the root element and isn't the descendant of any other element. It only works in IE.

Since it only works in IE, you can use it to override stuff just for IE.

For example,

Code:
* html > div.classname {
  
}
would match any divs with a class="classname" that are the child of the html element in IE only.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:35 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.