IE Problems |
IE Problems |
Dejan |
Jan 14 2009, 07:47 AM
Post
#1
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
Heya guys,
im really sorry but i dont have the problem site on the net(no hosting) hope ya willing to help me anyway, im searching for the problem for 2 days now.. The site is perfect in Opera and FF. But when i viewed it with IE my eyes teared. -Text is way too big -the menu on the left sucks(some kinda weird blue bar) -Banner is not well I tried to sort out with css validator, but i didnt understand THE CSS CODE body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #41383C; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } .twoColFixLtHdr #container { width: 900px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #5E7D7E; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 7px solid #5E7D7E; text-align: left; /* this overrides the text-align: center on the body element. */ margin-top: 1px; } .twoColFixLtHdr #header { background-image:url(Bannerindiaanzwart.jpg); background-position: center center; padding: 0 0px 0 0px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */ border-left: 1px groove #00FFFF; border-right: 1px groove #00FFFF; border-bottom: 2px groove #00FFFF; } .twoColFixLtHdr #header h1 { margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */ padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */ } .twoColFixLtHdr #navigatie { float: left; /* since this element is floated, a width must be given */ width: 150px; /* the actual width of this div, in standards-compliant browsers, or standards mode in Internet Explorer will include the padding and border in addition to the width */ font-family: verdana, Helvetica, Arial, sans-serif; font-size: 12px; font-weight: bold; width: 180px; border-right: 1px solid #666; padding: 0; margin-bottom: 1em; background-color: #2B547E; color: #000000; } #navigatie ul { list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; } #navigatie ul li { margin: 0; border-top: 1px groove #736F6E; } #navigatie ul li a { display: block; padding: 2px 2px 2px 4px; border-left: 20px solid #348781; border-right: 1px solid #69c; border-bottom: 1px solid #369; background-color: #3EA99F; color: #000000; text-decoration: none; width: 150px; } html>body #navigatie ul li a { width: auto; } #navigatie ul li a:hover { border-left: 10px solid #347235; border-right: 1px solid #69c; border-bottom: 1px solid #369; background-color: #69f; color: #fff; } .twoColFixLtHdr #mainContent { margin: 0 0 0 200px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */ padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ font-size:9px; } .twoColFixLtHdr #footer { padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear above it. */ background: #348781; border: 1px groove #00FFFF; } .twoColFixLtHdr #footer p { margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */ padding: 3px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */ } .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */ float: right; margin-left: 8px; } .fltlft { /* this class can be used to float an element left in your page */ float: left; margin-right: 8px; } .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */ clear:both; height:0; font-size: 1px; line-height: 0px; } .style2 { color: #000000; font-weight: bold; } .style3 {color: #000000} please help Ciao Deejan This post has been edited by Darin McGrew: Feb 28 2009, 09:55 PM |
Dejan |
Feb 28 2009, 08:06 AM
Post
#61
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
???
|
Darin McGrew |
Feb 28 2009, 09:57 PM
Post
#62
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I'm still not sure what you're trying to do, or why you think you need to specify a height for your main container. Just let your main container adjust to its content, and design the background images to adapt to any height of the main container.
|
Dejan |
Mar 17 2009, 12:45 PM
Post
#63
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
heya sorry guys for my long time being offline,
had a lot on my mind.. im back for now. I also beginning a new design, the old one pretty sucked i think. Darin, On your post above, an example: http://smitska.woelmuis.nl/layout2.html If u open it with IE, the main container in the middle goes almost from top to bottom(which is quite correct), if u open it with opera.. Its correct on top, but on the bottom there is a huge gap. So thats the problem, i dont know what sizes to give the container. U say let it adapt the size of the concent, but every page has a different content so that would be quite ugly that the size changes every page Greetz Dejan |
pandy |
Mar 17 2009, 11:57 PM
Post
#64
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
Fix the errors to start with.
http://www.htmlhelp.com/cgi-bin/validate.c...s&input=yes Fixing the only CSS error will shed some light. http://jigsaw.w3.org/css-validator/validat...g=1&lang=en You can't both declare new properties and use inherit at the same time. Remove inherit and you'll see what's going on. Now you should see the underlined non-breaking spaces all the way down. The content of #header is higher than #header so it overflows. It's higher than "container too. Again it overflows. This is what happens in good browsers, not only Opera. IE instead expands the height of the box to fit its content. This is why it's not a good idea to define a fixed height for text. It must go somewhere and you can never know the actual height of a piece of text since that depends not only on the amount of text but also on the user's preferences. |
Dejan |
Mar 18 2009, 09:04 AM
Post
#65
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
Thanks for your respond paddy.
I fixed all the errors in my page. But i still dont understand why there is such a huge gap under the container(opera). I u want to explain, please do it with a little more css codes, because i have problems with understanding technical english. I want to have the layout dont soon...... because damn i suck at it hehe http://smitska.woelmuis.nl/layout2.html This post has been edited by Dejan: Mar 18 2009, 09:08 AM |
pandy |
Mar 18 2009, 09:58 AM
Post
#66
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
Because of this. If you had kept the text-decoration: underline you could have seen all those little underlines all the way down.
HTML 47 <div id="header"> 48 <p>HEADER</p> 49 <p> </p> 50 <p> </p> 51 <p> </p> 52 <p> </p> 53 <p> </p> 54 <p> </p> 55 <p> </p> 56 <p> </p> 57 <p> </p> 58 <p> </p> 59 <p> </p> 60 <p> </p> 61 </div> To make it clear, there is no gap. The content, that is all the paras with , is taller than the boxes that contain it. The text must go somewhere. Good browsers let it overflow its container, or containers in this case. The text will stick out below the containing boxes, you could say. Bad IE expands the height of the containers to fit their content. With me now? Replace all the with a visible word and you can see it clearly. |
pandy |
Mar 18 2009, 10:33 AM
Post
#67
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
Again, this is why it's a bad idea to fix the height of boxes that will contain text.
|
Dejan |
Mar 18 2009, 11:32 AM
Post
#68
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
but how must i do it then without giving sizes to the containeR??
It must have a background, so i dont know what sizes... really complicated =\ |
pandy |
Mar 18 2009, 01:41 PM
Post
#69
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
If you want it to look exactly like that, you have to cut the background up and use it as several backgrounds. For example non-repeating top and bottom parts and a middle part that repeats vertically. That may mean you need to add more HTML elements since you can only have one backgrund per element.
|
Frederiek |
Mar 18 2009, 01:47 PM
Post
#70
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
This is all you need in the <body> tag:
CODE <div id="container"> <div id="header"> <p>HEADER</p> </div> </div> <div align="center">advertentie: <script language="javascript" type="text/javascript" src="http://views.m4n.nl/_v?zid=502602"></script> </div> |
Darin McGrew |
Mar 18 2009, 02:16 PM
Post
#71
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
CODE <div id="header"> To me, this just screams out for a heading element (i.e., h1, h2, etc.).<p>HEADER</p> </div> |
pandy |
Mar 18 2009, 02:40 PM
Post
#72
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
For example non-repeating top and bottom parts and a middle part that repeats vertically. So I was wrong. I thought the border was part of the image. Good news, you only need 2 bg-images. Much easier. If you use 2 containers you can use a small repeating background with just the color at the top of the old image for the outer one. Then you position the the other background, the one with the girl, at the bottom of the inner container. It will overlay the repeating background. Use the borders with these containers too and fix the space between them with padding. Maybe it's easier to understand if you see it done. You deserve a break, I think. http://w1.181.telia.com/~u18115332/dejan/ Now you can have as little or much text as you want and the containers and the background(s) will adopt. I removed all heights. You probably want to adjust the padding and margins the heading, I didn't bother with that. |
pandy |
Mar 18 2009, 02:54 PM
Post
#73
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
I see now that I maybe didn't pick the best bit of your image for the repeating background, but you can fix that.
|
Dejan |
Mar 18 2009, 03:44 PM
Post
#74
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
Thanks for your work pandy, appreciate it alot
So if i understand right, U made that the container adapt the sizes of the background images? or to the text what is in the container? anyway, its almost what ive looking for, im trying to edit now and observe your version, so i know what i did wrong.. I really want to learn this thanks alot!!! |
pandy |
Mar 18 2009, 04:01 PM
Post
#75
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
You're welcome.
Both wrappers expand and shrink with the height of the text. That's what block level elements do if you don't stop them. Remove some lines and then add some lines and you'll see how it works. The top background tiles vertically, so it fills the space however small or big. The bottom background doesn't tile and is glued to the bottom of the inner wrapper, so it will always be at the bottom. If you don't want the text to go all the way down you can add a little bottom padding to the inner wrapper. QUOTE anyway, its almost what ive looking for, im trying to edit now and observe your version, so i know what i did wrong.. You tried to control too much. Control as little as possible. Content needs to be able to grow or shrink. Change text size in your browser and see how the height varies. That's one thing you can't have control over, so you have to work with it, not against it. |
pandy |
Mar 18 2009, 04:07 PM
Post
#76
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
Use the borders with these containers too and fix the space between them with padding Uhm, wrong again. The inner border must be on your old container. Both the wrappers I added must span the whole width so both backgrounds can go all the way out. That's why three DIVs are needed. |
Dejan |
Mar 19 2009, 12:42 PM
Post
#77
|
Member Group: Members Posts: 49 Joined: 14-January 09 Member No.: 7,542 |
Thanks pandy for the help!!
Another question(dont know if its right to ask here) Does anyone have a option of how to make a nice menu that fits to the current page? I made a few but they didnt fit nice to the page. |
Frederiek |
Mar 19 2009, 03:57 PM
Post
#78
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
That's a matter of taste, really.
Post the url of what you tried, maybe we can give you some suggestions. |
pandy |
Mar 19 2009, 04:48 PM
Post
#79
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,734 Joined: 9-August 06 Member No.: 6 |
I forgot to say this earlier. You use 'groove' for the border style. But you can't get a groove border with only 1 pixel and I doubt it's groovy (ha ha!) with 2 pixels either. The more fancy style borders take several pixels since they consist of several parts. No show stopper. Just thought you'd want to know.
|
Frederiek |
Mar 20 2009, 03:12 AM
Post
#80
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Correct.
Nonetheless, even with a 2px groove border, the effect looks quite good and subtle: darker on the lighter parts of the image (top) and lighter on the darker parts (bottom). Groovy, ain't it? |
Lo-Fi Version | Time is now: 23rd May 2024 - 02:45 AM |