Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
need help with hide div in css
Old 12-19-2010, 11:25 PM need help with hide div in css
Junior Talker

Posts: 4
Name: vishal srivastav
Trades: 0
Hi i am thinking to use css div hide property wid a iframe. But i want that iframe should b LOAD as hidden or u can say i want to hide a iframe with css div hide property but iframe should be loaded as hidden in the page. Please tell if which of these code will work.
1st code:
Code:
 <div style="display:none"><iframe width="30%" height="30%" src="http://example.com/dynexample.html"></iframe>
2nd code
Code:
<div style="visibility:hidden"><iframe width="30%" height="30%" src="http://example.com/dynexample.html"></iframe>
1st code or second? Will both work?

Last edited by V4ViSHAL; 12-19-2010 at 11:27 PM.. Reason: just to correct
V4ViSHAL is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-20-2010, 02:27 AM Re: need help with hide div in css
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
Code:
<div style="visibility:hidden;display:none;"><iframe width="30%" height="30%" src="http://example.com/dynexample.html"></iframe></div>
More secure to cover all browsers (Opera, too).
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 12-20-2010, 03:54 PM Re: need help with hide div in css
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
visibility: hidden; will mean the element will NOT be visible but will occupy space in the document thus leave a gap in the flow of elements.

display: none means the element will occupy no space in the document.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-20-2010, 09:09 PM Re: need help with hide div in css
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 9,007
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
For accessibility's sake, I suggest taking a cue from how CSS-based dropdown menus work, and giving that div a negative top or left margin sufficient to take it off the visible page until called for, rather than using display: none; .

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 12-21-2010, 10:44 AM Re: need help with hide div in css
Junior Talker

Posts: 4
Name: vishal srivastav
Trades: 0
oh thanks you guys. so after hiding the iframe with hidden or none div property with one from both method.question is that "will iframe load as hidden in that div?" or "or it will be terminated?"
V4ViSHAL is offline
Reply With Quote
View Public Profile
 
Old 12-22-2010, 09:24 AM Re: need help with hide div in css
Junior Talker

Posts: 4
Name: vishal srivastav
Trades: 0
hey anyone? Please tell me if a iframe can load in a hidden div on a page.
V4ViSHAL is offline
Reply With Quote
View Public Profile
 
Old 12-22-2010, 04:46 PM Re: need help with hide div in css
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
If the container is hidden then so are the contents, but if you are thinking of using it for "cookie stuffing" or faking referrer visits, it will get caught.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-22-2010, 09:32 PM Re: need help with hide div in css
Junior Talker

Posts: 4
Name: vishal srivastav
Trades: 0
no i want it 2 show as opened at once using js n css
V4ViSHAL is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to need help with hide div in css
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 3.29339 seconds with 12 queries