473,507 Members | 8,054 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<div> show/hide without javascript

I have a css tabbed text menu (Home - Services - About - Contact) and
would like to show appropriate text formatted in <divblocks on the
webpage when clicking on the menu. Is it possible to do without
javascript? I was experimenting for a day, but found no solution. So
far it seems the only way is to use js to hide/show <divblocks with
an ID.

many thanks, Bela

Sep 19 '07 #1
2 8052
be*********@gmail.com wrote:
I have a css tabbed text menu (Home - Services - About - Contact) and
would like to show appropriate text formatted in <divblocks on the
webpage when clicking on the menu. Is it possible to do without
javascript? I was experimenting for a day, but found no solution. So
far it seems the only way is to use js to hide/show <divblocks with
an ID.

many thanks, Bela
With a *click* and not reload the page, then yes it would require
JavaScript.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 19 '07 #2
be*********@gmail.com wrote:
I have a css tabbed text menu (Home - Services - About - Contact) and
would like to show appropriate text formatted in <divblocks on the
webpage when clicking on the menu. Is it possible to do without
javascript? I was experimenting for a day, but found no solution. So
far it seems the only way is to use js to hide/show <divblocks with
an ID.

many thanks, Bela
Well, any browser that supports the :target pseudo-class (Wikipedia
tells me that FF >= 1.5, Safari (unknown version), Konqueror >=3.4,
Opera >= 9.5, and MS's non-IE layout engine >= 0.9 support it) can use
clever targeting to do the job. However, :target is in CSS 3, so
practical usage is impossible...

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Sep 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7741
by: KathyB | last post by:
Hi, totally new to the div show/hide thing. I have some rows in a table. When I first load the page, I only want to see divs where the divID=ForView. When I load now, I see BOTH rows...even...
8
23962
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
19
4430
by: benzwt | last post by:
I use the following function to hide a <div> named one. function hideObject() { if (ns4) { document.n1.visibility = "hide"; } else if (ie4) { document.all.style.visibility = "hidden"; }...
5
13137
by: hibernate | last post by:
I'm somewhat new to javascript/DHTML, and this problem has been plaguing me. I have made an 'array' of <div> tags within my html document like so: <div id="menu"> menu1 </div> <div id="menu">...
2
12168
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
3
3791
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
8
104026
by: Primal-oooze | last post by:
In most newer browsers, would the following methods successfully write to the <div>s below? ------ <script> document.all.div1.innerText = "Some random text."; document.all.div2.innerHTML =...
5
4891
by: widevision7 | last post by:
I have a web site that uses the following JavaScript to hide <div> sections: <script type="text/javascript"> function showMe (it, box) { var vis = (box.checked) ? "block" : "none";...
8
10015
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.