473,808 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font-style:Italics in IE7 does not work

Frinavale
9,735 Recognized Expert Moderator Expert
I have the following styles:
Expand|Select|Wrap|Line Numbers
  1. .unavailable
  2. {
  3.     /*font-style: italic;*/
  4.     color: #878787;
  5. }
  6. .available{
  7.  
  8. }
My problem is that if I uncomment the "font-style: italic;" code, the style is not loaded after an asynchronous postback in IE7.

When I remove this line of code everything works fine.

I would Really really like to have to the text in the <span> with the "unavailabl e" style to be italicized.

I tried changing it to font-style:oblique;
However this did not fix the problem either.

Is there a way around this problem?

Thanks for your time
-Frinny
Apr 19 '10 #1
5 3482
drhowarddrfine
7,435 Recognized Expert Expert
If I'm following, you receive some data that goes into .unavailable but it's inserted via script and the style is not maintained? If so, it's one of the problems with that but I can't think of the workaround cause I'm drinking right now.
Apr 19 '10 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Nope that's not the problem.
On the server I change the css class of a <span> element to be the following:


Expand|Select|Wrap|Line Numbers
  1. <span id="someId" class="label unavailable"> some text </span>
The style is changed properly.
And in every browser it works properly too...except for IE7.

In IE7 the text is invisible when the page is re-rendered in the browser.

Upon further investigation I discovered that the problem with the italic is a little more complicated than I thought. Note how I'm using 2 classes? The "label" class is as follows:
Expand|Select|Wrap|Line Numbers
  1. .label{
  2.   display:block;
  3.   float:left;
  4.   width: 170px;
  5. }
  6. .unavailable
  7. {
  8.     font-style: italic;
  9.     color: #878787;
  10. }
  11. .available
  12. {
  13. }
Upon further investigation I discovered this has nothing to do with the asynchronous requests....the problem happens during full page requests as well. When ever I use a style that should be applied to a "block" element (eg: display: block or float:left) the font-style:italic breaks everything (the text is invisible...). If I remove the "display:bl ock" or "float:left " the italics works fine.

-Frinny
Apr 19 '10 #3
Frinavale
9,735 Recognized Expert Moderator Expert
If I use:
Expand|Select|Wrap|Line Numbers
  1. .unavailable
  2. {    
  3.     color: #878787; 
  4.     font-style: italic;
  5.     text-align: center;
  6. }
or

Expand|Select|Wrap|Line Numbers
  1. .unavailable
  2. {    
  3.     color: #878787; 
  4.     font-style: italic;
  5.     text-align: right;
  6. }
The text displays.....Bu t I want my text to be to the left which doesn't work (even if I specify it) and text-align:justify also does not work.



-Frinny
Apr 19 '10 #4
Frinavale
9,735 Recognized Expert Moderator Expert
Well this is one of those bugs that makes you want to smash your head against the desk. It doesn't Always happen...just after re-rendering a page with italics after posting to the server.

There's nothing I can do that will work around this problem (text-align center or right is just not going to look good).

I considered putting in browser checking code but this would require me to write an entirely new CSS file to use Just for IE7............ .......Waste of my time and resources!

Just for one lousy browser.

At least the fixed the problem in IE8 (whatever it is).

Apparently this font style is nothing but a headache.

I give up!

I'm not going to use italics.

-Frinny
Apr 19 '10 #5
Frinavale
9,735 Recognized Expert Moderator Expert
I couldn't let this bug get the better of me so I tried to fix it again today and was successful.

I had read multiple things online stating that the italics font style extends too far past it's parent container (usually causing unwanted scrollbars etc to appear). I dismissed the solution to this problem because the description didn't match but I tried it in my CSS today and it works great.


All you have to do is set overflow:auto for any block element that is display italic text! This fixes the "things becoming too large" problem and it fixes the problem with the text simply not displaying that I was facing.

I'm happy that the fix didn't involve browser checking or anything that would make my css invalid.

-Frinny
Apr 21 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

32
3953
by: Andreas Prilop | last post by:
Here is an illustration of the warning http://ppewww.ph.gla.ac.uk/~flavell/charset/browsers-fonts.html#dont that you should not specify a typeface when you have characters outside West European Latin-1 on your page. The reference test page is http://www.unics.uni-hannover.de/nhtcapri/temp/arial.html This http://www.unics.uni-hannover.de/nhtcapri/temp/face-arial.gif is the horrible result in Mozilla 1.3 on Mac OS 9.1 when I do
4
2526
by: George Hester | last post by:
I have this in a html <div id="fltUp" align="center"><font size="3+" id="fntStop">Howdy</font></div> Now in JavaScript I can read fltUp.innerText.length. But if the size of the font changes fltUp.innerText.length does not. How can I compensate the width of Howdy when the font size changes? Thanks. -- George Hester __________________________________
10
4057
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out the web page in question... http://clientserver.home.comcast.net/unicode.html If you examine, for a few examples, characters such as square root (&amp;#8730;), prime (&amp;#8242;) and double prime (&amp;#8243;).
2
4779
by: Amith | last post by:
Hi, I am using an ActiveX created using delphi. It has a font property exposed. The font property is of type IFontDisp in the server(delphi). The font properties like Size, Bold, Underline etc has both 'Set' and 'Get' methods when using the activex in a VS6 app. But when using the activeX in a VS.NET app, the font properties are read only. The only way that i can set the font properties is by:
3
1265
by: Charlie Peppler | last post by:
I've just installed a new OpenType font (http://www.typography.net/type/bliss.htm) on a WindowsXP Pro box. The font is useable in Office 2003 apps, no problem. However, when I open up VS2003, and create a form, with a text box in it, and try to set the font, the new font does not appear in the font list. How can I get VS2003 to recognize my new OpenType font?
4
1783
by: Joseph Gruber | last post by:
Is there any way to use the 'System' Font for a label?
6
2860
by: andrew.ames | last post by:
Hi I have a pretty basic windows application created in Visual Studio 2005 and VB.NET. I set my Form's font to Arial 8.25pt, so when i added a label and a button they automatically have a font of Arial and 8.25pt. Great.
43
2285
by: Andy Mabbett | last post by:
I'm about to publish (what's the web equivalent of "reprint"?) an old paper article, whose heading is in this font: <http://www.flickr.com/photos/pigsonthewing/2446437162/> Can anyone kindly suggest a similar font suitable for use in CSS (I'll make sure something less fancy is specified as a fallback). Thank you.
16
8651
by: Laszlo Nagy | last post by:
I need to create multi lingual invoices from reportlab. I think it is possible to use UTF 8 strings but there is a problem with the font. I could not find any free TTF font that can do latin1, latin2, arabic, chinese and other languages at the same time. Is there a single font that is able to handle these languages? (Most of our invoices will be for EN, FR, DE, HU, SK, CZ, RO but some of them needs to be in Chinese.) Thanks, Laszlo
3
2437
by: HL | last post by:
As the subject, I like the font he used for codes. It's not constant- width but better than constant-width fonts while presenting text. Netters, could you tell me the name of that font? I hope to use it in my writing. Thank you.
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.