html/css IE Div Help
- Started
- Last post
- 6 Responses
- wademd
Hey guys,
I am currently at work trying to convert our site to use mostly DIVS instead of tables and I am running into a major issue on the header when Internet explorer views it. The formatted h1 tag gets covered up by the div header. When I open it up in firefox/flock everything looks fine.
Any ideas as to what I could do to fix the issue? The css is in the source code at the moment.
- wademd0
yeah I know, its a shame most of the world still uses that crappy browser but in the meantime I need a solution!
- Stugoo0
on
.h1-container
give it a width of 100%;so
.h1-container { width: 100%;}
because it is a blcok element you need to declare something like this.
- wademd0
that worked!
Thank you so much!
- thepda0
Also just a helpful hint, IE6 and IE7 render pages nearly different. If your designing a product for a client, I would suggest crash testing each one. Not using tables is a great thing, welcome to 2000!
But, your CSS file named style.css should look something like this:
/* import & hide from ie/mac \*/
@import url("reset.css");
@import url("master.css");
@import url("ie.css");
/* end import & hide */Then all of your css "hacks" or fixes should be contained in IE for organizational manners. The master.css file contains all of your structure elements. You could create another file called fonts.css that could contain all of the font styling, or colors.css for specific colors.
Your going to run into plenty more IE problems if you don't wind up organizing.
- wademd0
Thanks for the tip, I usually keep everything in one file to start to save time switching back and forth, then organize after. luckily I don't do websites for clients too often especially since web designers now have to be programmers in the new php world and I am no where near ready to jump in that direction.