• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

swap content picture/text

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem is that I have a content that has a pretty big picture in it when the page loads, but What I want is when I click on the menu the pic disappears and be replaced by the content of whatever is clicked.
working link at www.sadibu.net/aj.php
note: Only Cephus Gregg Jr has content and when click it will display on the right of the pic
Also only Home should display the pic

As CSS this is a bit of what I have

Never written a piece of javasript how can I do one that will do what I want

Thank you
#content {
/* float then create left and top margin of content */
float: both;
margin-left: 280px;
margin-top: 0 ;
}

#content img {
float: left;
margin: 0;
padding: 2px;
border: 1px solid #FF0000;
}
<body>
<div id="content">
<img src="images/JamalHis_big.jpg" alt=""
width="630" height="953">
</body>
[ August 24, 2006: Message edited by: Cheikh Sow ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you after a classic framed site? That is what it seems like by the example.

Eric
 
Cheikh Sow
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I am not using frame All my layout is based on CSS
basically i have a header footer left navigation and the content on the right.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I basically am saying, why don;t you use frames since that is what you are after.

Or since you are using php on the server and adding the new content, why donl;t you put the content into a div and display it.

I do not see how CSS is involoved in this when you are using the server to replace content. I am confused more than you are.

You want the picture to disappear. So remove it. Do not show it.

Eric
 
Cheikh Sow
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me clarify I want the picture to disappear only under one condition and that is when home is not clicked. Also the pic is displayed inside the content, and since I have only on content I need to be able to alternate from pic to text. And why do you want me to use html frame when you know more than I that it sucks, and basically what I have so far is a frame as you notice. Can javascript do what I want if so how?
[ August 24, 2006: Message edited by: Cheikh Sow ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To make things appear and disappear, toggle the CSS display attribute between none and block.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic