CSS - Italics Causing A Vertical Shift.
Hello CSS gurus,
When I add an italic font style to my web page, it causes a vertical shift in IE6. Everything is fine in Firefox. Can anyone tell me what is happening with this? Vertical Shifted with Italics: http://www.innovations-online.com/t...ch_news_it.html No Italics is Fine: http://www.innovations-online.com/t.../tech_news.html The same problem occurs with oblique. Thanks in advance! Darin Similar TutorialsI am having a problem unique to IE 8. The right most nav button jumps down a bunch of pixels. This does not seem to be happening in any other browsers, except IE 8. Some code involving said elements: Code: #nav { right: 10px; top: 45px; position: absolute; background-color: black; height: 50px; width: 640px; } ul { text-overflow: clip; display: inline; border-bottom: 25px solid black; } li { list-style-type: none; float: left; margin-top:25px; } #aboutButton { display: block; height: 20px; width: 93px; background-image: url(images/nav/about_button2.gif); margin-left: 40px; clear: both; } #aboutButton:hover { display: block; background-position: 0px 20px; height: 20px; width: 93px; background-image: url(images/nav/about_button2.gif); clear: both; } message me for a link to the site if you would like to see it in action. any help is appreciated. thanks! I've encountered the italics problem with IE and am trying to work around it. I followed the hack from the http://www.positioniseverything.net...alicbug-ie.html page but it really screws things up. My page is cut, more or less, into 3 sections: header, main, footer. Since I don't use any italics in either the header or footer, the rule needs only to apply to main. It CAN apply to the others, but it doesn't need to. Now, when I apply the hack, instead of my page lining up with the 'header' on the left hand side and the main on the right hand side, it completely pushes my 'main' area down so that it doesn't start until after the header and I have no idea why? I noticed that if I put the hack in each particular page (rather than in the external file sheet) then it works, but why? I used this tutorial to create my rounded corner boxes. Now if I change the font in the content of the box to italics, IE goes bananas. I read about the "Holly Hack" by setting the height to 1%. I can't seem to get it work with these rounded corner boxes. I'm not sure what div to apply it to. Here is the relevant html for the boxes: Code: <div class="bluebox"> <div class="hd"><div class="c"></div></div> <div class="bd"> <div class="c"> <h4>Something</h4> <p>Content Goes Here</p> </div> </div> <div class="ft"><div class="c"></div></div> </div> And the css is this: Code: .bluebox { margin:0 auto 8px auto; color:#fff; } .bluebox .hd .c{ font-size:1px; height:16px; } .bluebox .ft .c{ font-size:1px; /* ensure minimum height */ height:18px; } .bluebox .hd { background:transparent url(images/tlb.gif) no-repeat 0px 0px; } .bluebox .hd .c { background:transparent url(images/trb.gif) no-repeat right 0px; } .bluebox .bd { background:transparent url(images/mlb.gif) repeat-y 0px 0px; } .bluebox .bd .c { background:transparent url(images/mrb.gif) repeat-y right 0px; } .bluebox .bd .c .s { background:#1caaec url(images/msb.jpg) repeat-x 0px 0px; } .bluebox .ft { background:transparent url(images/blb.gif) no-repeat 0px 0px; } .bluebox .ft .c { background:transparent url(images/brb.gif) no-repeat right 0px; } .bluebox h4 { font:0.9em Verdana, sans-serif; font-weight:bold; padding-left:5px; } .bluebox p { font:0.8em Verdana, arial, sans-serif; font-style:italic; padding:2px 10px 8px 5px; text-align:justify; color:#000000; } Any ideas where to stick the Holly Hack? Hi, I've done the usual amount of searching and can't find anything on this anywhere. That probably means its not possible but i'll ask anyway. Can you change the angle the text is at when italics are used? I would like it to be somewhere in between normal and italics. Thanks for any help I decided to check how my site looks in Opera, so I installed the latest Mac version and found that none of the italics showed up where I was using sans-serif fonts. For example, the code below works as I expect it to in other browsers, but in Opera each line appears as normal (not italicized) text: <body style="font-family:sans-serif;"> <p>Normal Text.</p> <p><i>Italicized text.</i></p> <p><em>Emphasized text.</em></p> <p style="font-style: oblique;">Oblique text.</p> <p style="font-style: italic;">Italic text.</p> Everything works fine if font-family is serif. Has anybody seen this problem or know how to get sans-serif fonts italicized in Opera? Seems like someone else must have noticed this, but I couldn't find an explanation anywhere. Thanks! Hi, Does anyone know how to veritcally align text using CSS? like <tr valign='middle'> when using tables. My page is on: http://www.3003online.com/demos/ecoceylon/v2/ You can see a difference in the "Home - About Us - Products - Contact Us" links when viewing from IE and Mozilla Firefox. Basically, I would like the text to be centered vertically in the bar... but CSS by default puts it on top. I tried adding padding,which helped in IE... but Firefox still shows the links a bit higher than they should be.,... any ideas how to fix this? Also, a different problem in case anyone knows how to fix it... you can see a small brown bar on the top bar. It is 50px in height. But I have no idea how to make its width as wide as the remainder of the page (this would change with different resolutions). The main content of the page is 760px wide. I would like a brown box next to that, which is 50px in height and the remainder width. Any ideas? "width: auto;" doesn't work unfortunately [ this is a follow up to my previous thread http://forums.devshed.com/showthread.php?t=270438 Any help would be greatly appreciated. Thanks very much. Hello, i have a DIV in which i have put a javascript for my top advertisement banner. This banner is one of those that when the user moves their mouse over it, it expands.. is there anyway i can make it so when the banner inside the div expands, the DIV height expands accordingly to the height of the banner? and when it collpases, the div will shift back to original height? thanks I've noticed when I am replacing my filler text with text that is not as long, Firefox is shifting my layout over to the right. For instance look at a look of filler text: http://www.jaycutler.com/Eumyotheria/the_beast/favorites.html Now for the replacing text: http://www.jaycutler.com/Eumyotheria/the_beast/contest_history.html You will notice if you use the sidebar (or the top nav) the shift occurs when you visit a page with a lot of content. In IE it is fine, but Firefox doesn't like. Not sure why as I use replaced text. Any ideas? The stylesheet is located here if needed: http://www.jaycutler.com/Eumyotheria/css/stylesheet.css Thanks for your time and any help that you can pass on. Brian The index page of my site shifts to the far left in IE. The background does not move (stays in center) but the rest of the page shifts far left. It only happens on the index page all others are fine. I would link to it but I am new and cannot post links...any suggestions? Thanks. The Divs holding the "In Stock" banners (absolutely positioned) on this page seem to shift to the right (the first box is missing a banner, and there is an extra banner off the page. Any idea why? Please view at woodflooringvalue.com and click on any of the product link buttons under the "in stock" heading. Thanks. Some of my pages are long enough to cause the primary vertical scroll bar to become active but most of the pages are short enough so that it stays hidden. Because of this the entire content automatically shifts to the left to accommodate the width of the scroll bar. I don't like that. I would like it to stay in the same spot no matter what. (centered) my wrapper has margin: auto, 0px; so that the page stays centered when the window size changes. Is there a way to just bump the page to the right only when the scroll bar is active? (via my external css) Thanks a bunch. (if there is a thread about this already please feel free to just post the link to it) Also, I am going to add this head-banging dude because its just so flippin stupid. I am editing a CSS layout I have found. Basically, I want a fixed header. The original layout had the fixed header (AP Div) take up 100% width with right positioning of 16px to allow for the scrollbar, but this was making it awkward for me to centre another div within the Header/AP Div, so I have edited my layout like this: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <style type="text/css" media="screen"> * { margin: 0px; padding: 0px; } #printhead { display:none; } html { height:100%; max-height:100%; padding:0; margin:0; border:0; background:#fff; font-size:80%; font-family: Arial, Helvetica, sans-serif; /* hide overflow:hidden from IE5/Mac */ /* \*/ overflow: hidden;/* */ } body { height:100%; max-height:100%; overflow:hidden; padding:0; margin:0; border:0; background-color: #EAEBEB; } #content { display:block; height:100%; max-height:100%; overflow:auto; position:relative; z-index:3; word-wrap:break-word; } #info { width: 750px; margin-right: auto; margin-left: auto; background-color: #666666; padding-right: 25px; padding-left: 25px; } #head { position:absolute; width:800px; height:137px; z-index:5; border-top-style: none; border: none; background-color: #FFFFFF; left: -400px; margin-left: 50%; } .top-spacer { display:block; height:137px; } .btm-spacer { display:block; height:30px; background-color: #FFFFFF; width: 800px; margin-right: auto; margin-left: auto; } </style> <style type="text/css" media="print"> html { padding:0; margin:0; border:0; background:#fff; font-size:10pt; font-family: arial, sans-serif; min-height: 100%; margin-bottom: 1px; } body { padding:0; margin:0; border:0; } #content { display:block; position:relative; z-index:3; word-wrap:break-word; } #head { display:none; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } #printhead { height:100px; background:#fff; font-size:24pt; color:#000; border-bottom:1px solid #000; } </style> </head> <body> <div id="head"></div> <div id="content"> <div class="top-spacer"></div> <div id="info"> <p>Type goes here and here Type goes here and here Type goes here and here Type goes here and here Type goes here and here Type goes here and here </p> <p> </p> </div> <div class="btm-spacer"></div> </div> </body> </html> Basically, I have cheated to centre the AP Div, but now in Firefox, when there is overflow, the Div underneath the header moves over to accommodate the scrollbar, but the header doesn't. Can anyone suggest a workaround for this? Thanks. Hey everyone, I am doing some stuff to my site, and I noticed that when someone clicks a link, the text shifts sligtly to the left. I thought it would be the active border, but I am not sure. It is a small bug, but it is kind of annoying me. Here is my link code. Code: #main a:link { color: #41619a; padding: 0; } #main a:visited { color: #41619b; } #main a:hover { text-decoration: underline; } #main a:active { border: 0; } Here is one of the pages where it happens. Any suggestions on how to fix this? I have a few lines of text inside a nested div. Everything is fine if I leave it at that but as soon as I add some more, the whole page (wrapper) get shifted left by 9 pixels. It causes a 'jump' hen navigating between this page and the rest of the site. All of these pages are quite simple and were created from the same index page. HTML Code: <div id="wrap"> <div id="content_awards"> <div id="subcontent_awards"> <div class="award_col"> <h3>Subtitle 1</h3> Winner<br /><br /> <h3>Subtitle 2</h3> Winner<br /><br /> <h3>Subtitle 3</h3> Commended<br /><br /> <!-- <h3>Subtitle 4</h3> Commended<br /><br /> --> </div> <br style="clear:both;" /> </div> <br style="clear:both;" /> </div> <br style="clear:both;" /> </div> CSS Code: body { padding:2px 0 0 0; margin:0; text-align:center; font-size:14px; background-color:#FFFFFF; } #wrap { margin:0 auto; width:760px; padding:0; text-align:center; } #content_awards { margin:0 auto; padding:20px 0 0 0; width:754px; color:#FFFFFF; text-align:left; background-color:#31578E; clear:both; } #subcontent_awards { margin:0 auto; padding:0 10px 10px 10px; width:734px; background-image:url('images/bg_awards_shadows.jpg'); background-repeat:no-repeat; background-color:#31578E; clear:both; } div.award_col { float:left; margin:0 0 0 1px; padding:0 10px 0 20px; width:152px; line-height:130%; font-size:12px; } Thanks, That title is probably a little confusing but it is what's happening. I have an inline list (<li>) that will shift to the right when I hover over links that have been visited. The links that have never been visited do not cause this problem. It's very strange and I'm not sure what's up. The page... http://www.vaska.com/a/ The css... http://www.vaska.com/a/css/c.css To get the menu to appear, hover over the "menu/options" and it will appear. I know for a fact that these issues are not becaused by the javascript in this file...somehow it's a CSS issue. I'm having the problem in Safari and Firefox...I'm not sure about IE/PC and such, but I'm betting the problem is there as well. Thanks for any help...v Hi all, I'm a CSS newbie and I need your help, pleeease! I tried to make a rollover graphic menu today. And of course I got completely stuck with this code: Code: /* Header */ #header { position: absolute; background: url(images/header.jpg) no-repeat; width: 830px; } #menu, #menu li a:hover, #menu li.current a { background: url(images/link_menu.jpg) no-repeat; } #menu { margin: 115px 0px 0px 29px ; width: 600px ; height: 75px ; list-style-type: none; } #menu li { float: left; margin: 0px 0px 0px 0px; width: 120px; height: 75px; } #menu li#menu-contact { margin: 0; } #menu li a { display: block; padding: 75px 0px 0px 0px; height: 75px; overflow: hidden; } html>body #menu li a { height: 0; } #menu li#menu-home a:hover, #menu li#menu-home.current a { background-position: 0px -75px 120px 29px; } #menu li#menu-about a:hover, #menu li#menu-about.current a { background-position: -120px -75px; } #menu li#menu-gallery a:hover, #menu li#menu-gallery.current a { background-position: -240px -75px; } #menu li#menu-foto-shop a:hover, #menu li#menu-foto-shop.current a { background-position: -360px -75px; } #menu li#menu-contact a:hover, #menu li#menu-contact.current a { background-position: -480px -75px; } The rollover works, but somehow it shifts to the right Like this: URL What am I doing wrong? Why does it shift? Thanks in advance... Hi all, I have written a page with jsp and ajax to dynamically load page contents. I also added a hidden "processing.." message image with the following code: Code: <img src="<%=IMAGE_BASE_URL%>/processing-img.gif" id="processing" style="display:none;z-index:2;position:relative;top:250;right:-250"> this img tag was placed right after the <body> tag. When the user clicks on a link, I turned this css property to display:block so that it shows in the middle of the page. But strangely, when it is showing the processing message image, the entire page content after the <img> tag was shifted down a bit and showing an empty row! Does anybody know what's wrong with it? I've tried to change the display to inline using javascript but it still won't help... Any help would be appreciated..thanks.. I really can't seem to even find the words to describe this error. I have posted before in regards to another issue that seemed to have alluded you guys so i am posting again for another error that is more important. What is the Error? Ok basically the yahoo(google has same issue) ad lags when you scroll up and down. When I say lag i mean it sort of stays in it's position while the rest of the layout moves on, after a second it corrects itself. I have excluded everything in my layout except the header, and even tried removing the ad from the div and everything and can't seem to figure out what is causing this issue. http://www.unlimitedgamer.net/header_re.php For users on WINDOWS (for some reason it works fine on MAC) based computers simply focus your eyes on the advertisement, and scroll up and down while watching it. It's impossible not to see it. Note, this issue doesn't occur in IE7 (note sure about IE6) Any help would be greatly appreciated as this lil bug is holding up the opening of my layout Hey gang. I have a very simple layout for a software interface.I am floating a vertical menu on the left, and to the right, is a horizontal navigation bar (float left), and below that (and to the right of the menu) is the main staging area for content (also float left). So essentially everything is float left. Inside the horizontal "path" bar I have a float left, and a float right, both holding two or three words of text. No problem. I am also performing a clear:both after all of this jazz, to allow the footer of the software to show below all of the content regardless. All is well in IE. In firefox, the horizontal nav bar DROPS below the menu, ONLY WHEN I have a float:right in the bar. Im made a very primitive mockup with inline styles to show you whats up in firefox....why does this drop? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <div style="float:left;width:100px;background:#CCCCCC;"> this is it!<br> this is it<br> this is it<br> this is it<br> this is it<br> this is it<br> this is it<br> this is it<br> this is it<br> this is it<br> </div> <!-- container --> <div style="background:#444444;padding:20px;float:left;"> <!-- mainnav --> <div style="background:#000000; padding:10px;"> <!-- subnav --> <div style="float:left; background:#FF0000;">this is the first one</div> <!-- utilnav --> <div style="float:right; background:#FFCC00;">this is another.</div> <!-- clear --> <div style="clear:both;"></div> <!-- /close mainstage --> </div> <!-- main container --> <div style="float:left; background:green;">thisis the main content</div> </div> <!-- clear --> <div style="clear:both;"></div> <!-- footer --> <div style="background:#EEEEEE;">footer</div> </body> </html> Im really starting to lose it. (my hair that is), and I know I must be missing something simple here.... thanks in advance gang! John Hi to all, I have a problem with an empty div. I have created an empty div as follows: Code: <div id="more"></div>Hello Now I set the height property of the empty div equals to 20px. On IE 7.0 it looks fine, with the hello under the empty div, however in FireFox and Opera Hello is being display nearly inside the empty div. What can i do to fix this and make it display always under the empty div? Thanks and Regards, Sim085 ps: I am using the Strick Doc Type. and I need the empty only to colour it in a different colour (for style that is). |