PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > <div> contents in same position?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
<div> contents in same position?

Réponse
 
LinkBack Outils de la discussion
Vieux 16/04/2008, 07h52   #1
Geoff Cox
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut <div> contents in same position?

Hello,

I have a series of <div> blocks which I want to appear in the same
position on the page, one after the other.

Can I do this with css/javascript?

At the moment one <div> block is visible and the other 3 invisible.
Once the first block has been used I want it to become invisible and
the second block to become visible and take its place on the page.

I can do the visible/invisible bit but the problem at the moment is
that each <div> occupies its own space and successive blocks, when
they are made visible, move along the page.

Cheers

Geoff
  Réponse avec citation
Vieux 16/04/2008, 08h25   #2
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: <div> contents in same position?

On 2008-04-16, Geoff Cox <gcox@freeuk.notcom> wrote:
> Hello,
>
> I have a series of <div> blocks which I want to appear in the same
> position on the page, one after the other.
>
> Can I do this with css/javascript?
>
> At the moment one <div> block is visible and the other 3 invisible.
> Once the first block has been used I want it to become invisible and
> the second block to become visible and take its place on the page.
>
> I can do the visible/invisible bit but the problem at the moment is
> that each <div> occupies its own space and successive blocks, when
> they are made visible, move along the page.


There are various ways to do this but one is to switch them between
display:block and display:none rather than between visibility:visible
and visibility:hidden.

If something's display:none then it's as though it weren't there at all.
  Réponse avec citation
Vieux 16/04/2008, 08h48   #3
Geoff Cox
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: <div> contents in same position?

On Wed, 16 Apr 2008 02:25:17 -0500, Ben C <spamspam@spam.eggs> wrote:


>> I can do the visible/invisible bit but the problem at the moment is
>> that each <div> occupies its own space and successive blocks, when
>> they are made visible, move along the page.

>
>There are various ways to do this but one is to switch them between
>display:block and display:none rather than between visibility:visible
>and visibility:hidden.
>
>If something's display:none then it's as though it weren't there at all.


Thanks a lot! Works as wished for.

Cheers

Geoff
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h14.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07622 seconds with 11 queries