开发者

Text centering in all browsers but Internet Explorer (Link included)

开发者 https://www.devze.com 2023-02-13 23:38 出处:网络
I am having trouble getting the text to center inside of a list item. This seems to only be happening in internet explorer and I just can\'t figure ou开发者_运维问答t why... Any help would be greatly

I am having trouble getting the text to center inside of a list item. This seems to only be happening in internet explorer and I just can't figure ou开发者_运维问答t why... Any help would be greatly appreciated.

Image Example:

Text centering in all browsers but Internet Explorer (Link included)

https://img.skitch.com/20110301-p9hg9ihgimd6srraa9cirnqcdp.jpg

Site (see problem area at bottom): http://www.levelsetsolutions.com/optimize/swa/


IE is entering in quirks mode. You can avoid that using a doctype like for example:

<!doctype html>


The width you set on the A tags is too small.

I'd recommend moving all the CSS properties having to do with dimensions (height, width, margin, padding, etc.) to the LI tag and adding a BR tag between each word in the list items. This is the only way to guarantee the line-break will happen where you want it to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号