/    Sign up×
Community /Pin to ProfileBookmark

Css Ie Hack

I have a very simple menu and I’d like to make changes in one specific <li> in the menu. I did that:

[code]
<li id=”menu_01″ style=”margin-left: 35px; html>body margin-left: 185px;”>Home</li>
[/code]

But there’s no change. If I take off the “html>body margin-left: 185px;” is still looks the same. What can it be?

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 13.2007 — [i]html>body {margin-left: 185px;}[/i] goes in the style sheet not the style attribute.

Better to use Conditional comments
Copy linkTweet thisAlerts:
@artcaseJun 13.2007 — Instead of trying to change the styling in html, you should designate it as a class difference.

For example:

/* sets the style for the menu taking away the bullet marks */

.menu {

padding:0;

margin:0;

list-style-type:none;

}

/* menu regular background color is grey */

.menu li {

background-color:#BBBBBB;

}

/* this changes the background color to a blue background */

.menu li.changed {

background-color:#00ccff;

}

See picture example

[upl-file uuid=8ff3b83a-a8f6-4e68-a450-e3a284a76672 size=4kB]menuexample.jpg[/upl-file]
Copy linkTweet thisAlerts:
@weeeauthorJun 13.2007 — Nothing I can do on the style attribute end?

Also, the link you gave me (Fang) is cool but how I couldn't figure out how I make it that way that everything under i.e. version 6 will act in a certain way?
Copy linkTweet thisAlerts:
@FangJun 13.2007 — Applies to IE < ver.7 &lt;!--[if lt IE 7]&gt;
&lt;style type="text/css" media="all"&gt;
#menu_01 {margin-left: 185px;}
&lt;/style&gt;
&lt;![endif]--&gt;
×

Success!

Help @weee 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...