Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Inline CSS Issue


Xapti - 9:32 am on Jul 25, 2011 (gmt 0)


Thank you. I'll see if incrementing the values by one fixes it.

If there is a gracefull way in CSS to deal with this without incrementing the number for IE's sake, I'd welcome input.

Using EMs for width instead of pixels could fix this across all browsers (although I'm not certain). It is still a good idea to give additional horizontal space in a container whether you are using pixels or em though — I don't know why you have an issue with that.

There is another issue that you also have do deal with if you want those items to stay on one line instead of two, and it requires the use of EMs for width. The issue is that not all users will follow your given fixed font size - they may have a minimum font size specified for their browser, or a custom stylesheet font. Using EMs allows the items to display on one line under all circumstances, regardless of font size.

With regards to editing the auto-generated mark-up (which you should do — leaving it with special/undesirable style info may bite you later on, not to mention is messy and takes up space), you can use an advanced find and replace utility that uses regex, to modify and/or delete various inline styles as a batch job, so that you don't have to spend an hour or more doing it manually (they can even do multiple files at a time). There are free regex editors out there, but even if you don't have one and are too lazy to get one, a normal find& replace function of any word processor or HTML editor will be able to delete simple entries such as "position: absolute" (albeit leaving the defunct/orphaned "top" and "left" entries)

As an alternative (and IMO last resort) to all that, you can add to your CSS style sheet/section saying ".stuff div{position:static!important}" Which will override the inline CSS. Obviously in addition, you will need to wrap your div elements in a new container with a class named "stuff". It's just as good if not better to even use an ID("#") instead of a class(".") here if you want.


Thread source:: http://www.webmasterworld.com/css/4342403.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com