/    Sign up×
Community /Pin to ProfileBookmark

IE conditional statement

I’ve seen I’m not the only one having issues with things not aligning correctly in Internet Explorer but I’m having trouble translating other peoples answer to my situation. My nav links line up ok in everything except every version of IE. In IE my links seem to shift about 20 px to the right. I’m somewhat new to CSS. How could I write a conditional statement for all versions of IE that would shift it 20 px to the left to offset it? The site I’m working on is at [url]http://www.7xstudios.com/test/index.html[/url]

Thank you in advance,
Craig

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@JimbrowskiNov 13.2009 — http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

Create a seperate stylesheet for your IE problems and add a link to it below your main stylesheet link, like in the examples above.

Only include the few CSS rules that need to be different in IE... don't repeat the whole stylesheet.

Due to the Cascade, browsers will style the page with the rules from the main CSS stylesheet, then IE browsers will add the few extra rules from the IE only stylesheet.

In your case I would guess you need to adjust your Padding or Margins for those particular elements...
Copy linkTweet thisAlerts:
@FangNov 14.2009 — Remove [I]left: -25px[/I] from [I]#Fayes_Sidebar ul li [/I]

Add [I]#Fayes_Sidebar ul ul {xborder:1px solid blue;margin-left:130px;xfloat:left;}[/I]
×

Success!

Help @Craigoooo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...