css iframe problem
- Started
- Last post
- 22 Responses
- ivan_cook
hello all.
this is working perfect on everything except IE on PC.
on IE for PC, the iframe has scroll bars on load, and is a bit too short. any ideas?
- piperboytoy0
I get a not found message when I click on the links. Where is the iframe? the middle?
- ivan_cook0
yes, the iframe is the middle of the table.
when the site loads, i am going to start with an image in the iframe and then switch out the content. none of the nav works except for "lunch" on the ASTI side.
On IE for WIN, the iframe is cropped about 20px on the top and bottom, and has scroll bars even though it is the exact same size as the image...
works perfect on everything else...
any ideas?
- lifeinbinary0
yes, i see no scrollbars in mozilla/ff but IE has the bars.
everytime i've used iframes, there's always been such a problem with scroll bars. i've always had to set the table width on the page in the frame a little smaller than width/height of the actual ifram so that there are no scroll bars.
seeing how this is a image page only, i would suggest making that image a background on images.html page so that there are no scroll bars.
the other option is to turn off the scroll bars in the iframe.
scrolling="no"
- ivan_cook0
interesting idea, but i really need the iframe to be the right size in IE. Sometimes i will load other content there. click on Lunch on the ASTI side.
any others?
- lifeinbinary0
in that case, making the image a background would work fine.
and if you want to get rid of just the horiztal scroll (thus allowing the vertical bar on pages like lunch), add style="overflow-x:hidden;" to the BODY tag in the document that you are displaying in the iframe.
- ivan_cook0
check out:
something is actually squezing the image vertically. if i make it a background image, it just tiles or is still not the right height.
- ivan_cook0
hmm. good eye. :-)
i finally got the scrollbars fixed by adding a table around the image and also defining the image size.
how would i fix the text problem you found? in the css?
- lifeinbinary0
yes, css.
a quick/dirty fix it to not use a list in the menu and use the good old br to go to a new line.
but if you really want to use a list, i can take a look at the code.
- lifeinbinary0
off the top of my head, maybe set the properties for the list in the CSS. something like:
#fino_menu ul
{ list-style: none; margin: 0; padding: 0; border: none; }#fino_menu li
{ margin: 0; }#fino_menu li a
{ display: block; padding: 0px 0px 0px 0px;}i haven't tried it so there is a chance i have no idea what i am talking about.
- lifeinbinary0
and of course you might need to define the font for the list property too. something like
#asti_menu li a
{ display: block; padding: 5px 5px 5px 7px; color: #285081; font-family: Arial, Verdana, sans-serif; font-size: 9px; text-decoration: none; }
- ivan_cook0
thanks so much for your advice. i would have never noticed that the text spacing was the problem.
http://www.ivancook.com/asti11
i think i've got it now. the works ok.
now if i just put every page in its own table and define the width, i think IE will behave.
thanks again!
:-)
- lifeinbinary0
looks great.
and you're welcome.
- mg330
css, iframes, tables?
Sounds like someone needs to discover scrolling divs.
- ivan_cook0
ok. ok. I wish I could do it all with css, but it's not an option for this.
I got the image page to work, but now I'm screwed again by IE.
click on "Lunch" on the ASTI side.
IE insists on a horizontal scroll bar.
the content is only 400 wide and the iFrame is 450 wide....
WHY is this happening?
it even does it with CSS off. I need the vert bar but NEVER the horizontal.
Ideas?
- jevad0
?!
doing it the way of the link I gave you is gonna be like 100x easier!?
how is it not an option!
- ivan_cook0
jevad-
i know that you are right in the long run, but I'm REALLY studid with this stuff :-(
i just got it working by removing the DOC Declaration from the pages i was loading into the iframe.
strange, but it worked.
- hiten0
scrolling divs are the way to go and super easy. and work in ie and ff. heres one i did when i was first learning this css layout stuff.
http://www.asf-studios.com/infor…
you will have to forgive the lack of organization when the css is removed it was my first css site and i did it for a friend.