Click to See Complete Forum and Search --> : UL Help.


DanUK
08-27-2006, 11:16 AM
Hello. I hope you can help me please.

I have attached my CSS layout, but I'm having an issue in Firefox and some other browsers and not sure how to get around it.

If you open the attached code in IE it renders properly, the UL list is pretty much flush to the left where it should be, however, if it's opened in Firefox or some other browsers, it's way indented to the right where it shouldn't be. How can I get firefox etc to render it like IE?

Many thanks!

PS. If you spot any "unneeded" code or weird CSS please let me know. :)

Rossario123
08-27-2006, 11:42 AM
well it is more than likely a i.e problem for reading bad coding

so here is your solution

correctly have it displayed in other browsers first.
then do the fixes from there

do not do the opposite and make it look good in i.e but not other browsers

once you have made it perfect in other browsers
go back and add this "css hack" to help i.e correctly render the css.


* html .MyClassSelector{properties that are off in i.e place here}

DanUK
08-27-2006, 12:18 PM
Hey, thanks for your reply.

To fix it in Firefox, we use:


ul {
margin: 0px 0px 10px -22px;
}


I'm not sure if that's normal for using -22px to say it right, that looks buggy. Did I do something wrong with the way the CSS is done as a whole?

If it's all ok, and that's quite normal, do get it working back in IE can I do the following in my css file:


* html ul { margin: 0px 0px 10px 22px; }

Rossario123
08-27-2006, 01:59 PM
negative values are allowed that is perfectly fine.

margin
margin-top
margin-bottom
margin-left
margi-right
left
right
top
bottom

those all accept negative numerical values

DanUK
08-27-2006, 02:10 PM
Ok thank you :)
I appreciate the help

Is that line ok with the * html ul, or should it just be * ul?
I assume the "*" means it's an IE only thing?

DanUK
08-27-2006, 03:24 PM
Yes, it's working! Thanks.

Can you confirm the below looks right? It works, but just in case I misunderstood something:

* html ul { margin: 0px 0px 10px 22px; }
ul {
margin: 0px 0px 10px -22px;
}

WebJoel
08-27-2006, 04:22 PM
Since other browser do not know what to do with "*", yes, only IE takes that and other browsers ignore it. It works and that's why. :)

DanUK
08-27-2006, 05:27 PM
Ok thanks.
Is it best to use "* html ul" or just "* ul", or makes no difference?

ray326
08-27-2006, 10:13 PM
Since other browser do not know what to do with "*", yes, only IE takes that and other browsers ignore it.Really?