Open Tech Support
Open 

Tech Support Community
Back to HomeCommunityReviewsGuidesDownloadsLinkageMarketplaceContact Us

 »  Forum Navigation

Home
Post a Question
About Our Site
Support Our Site

What is this site?
Who are we?

Tolitz.Com - The Cynic Eye of the Third World Guy

Enhanced with Snapshots

 

 »  Advertisement


Go Back   Open Tech Support Community > SUPPORT FORUMS > Internet




Reply

 

LinkBack Thread Tools
Old 06-11-2006, 01:43 PM   #1 (permalink)

Ukrainian Top Gun
 
VmanBeBop's Avatar
 
Join Date: Jan 2004
Location: Cloud 9
Posts: 415


Nesting in CSS

Hey guys, I've been playing around with CSS so I could implement it into my site. I've pretty much got it down. However, something I'm seeing that doesn't seem to be explained anywhere is when the selector has multiple items that aren't seperated by commas, as so:
Code:
table table td div img {visibility:hidden;}
Does this indicate how particular items nested in a certain way would behave? For example, would the above style sheet have the following effect?
Code:
<table>
	<table>
		<tr>
			<td>
				<div><img src=hooplah.jpg></div> //this image is hidden
			</td>
		</tr>
		<tr>
			<td>
				<img src=halpooh.jpg> //whereas this one is not
			</td>
		</tr>
	</table
</table>

-----------------------------
Flüg Wer Genügen
VmanBeBop is offline   Reply With Quote
Sponsored Links
Old 06-14-2006, 11:56 AM   #2 (permalink)

Ukrainian Top Gun
 
VmanBeBop's Avatar
 
Join Date: Jan 2004
Location: Cloud 9
Posts: 415


Re: Nesting in CSS

This is definately not a bump...

-----------------------------
Flüg Wer Genügen
VmanBeBop is offline   Reply With Quote
Old 06-14-2006, 09:59 PM   #3 (permalink)

Super Freak
 
DemonBob's Avatar
 
Join Date: Dec 2000
Location: Hammond, Lousiana, United States
Posts: 1,343


Re: Nesting in CSS

The better way to do this would be something along these lines, if i remember corretly: Don't quote me on this.


div#somename_visable{
// CSS for HIDE
}

div#somename_hidden {
// CSS for visable
}


Code:
<table>
	<table>
		<tr>
			<td>
				<div id="somename_hidden"><img src=hooplah.jpg></div> //this image is hidden
			</td>
		</tr>
		<tr>
			<td>
				<div id="somename_visable"><img src=halpooh.jpg></div> //whereas this one is not
			</td>
		</tr>
	</table
</table>
Basically it's asinging uniqe itdentifiers to the to div tags, that why your CSS is cleaner and you can reuse the code for other div tags. Hope this point you in the right direction. If you need more explaination, let me know. I'll have to take a few minutes to brush up and figure out the exact code.

-----------------------------
dd if=/dev/zero of=/dev/hdx bs=4096

Dustin B Coates
Network Engineer - System's Admin
SystemOverload.Net: A Simple Man, A Complex Mind: Ramblings of a Geek
DemonBob is offline   Reply With Quote
Old 06-15-2006, 08:22 AM   #4 (permalink)

Ukrainian Top Gun
 
VmanBeBop's Avatar
 
Join Date: Jan 2004
Location: Cloud 9
Posts: 415


Re: Nesting in CSS

I'm not sure if what you said works, but i think you may talking about classes where you would do:
Code:
div.hide{visibility:hidden;}
where 'hide' is a class of div. Then in every div statement that you wanted to hide stuff, you would set the class variable to the one you wanted to use. As so:
Code:
<div class="hide"></div>
As yet, I would still like to know if the code syntax I explained in my first post is what I think it does (nested tags in CSS).

-----------------------------
Flüg Wer Genügen
VmanBeBop is offline   Reply With Quote
Reply

Bookmarks

Thread Tools








Powered by vBulletin® Version 3.8.2. Copyright © 2000-2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
Copyright 2000-2008 Open Tech Support.  All Rights Reserved.  Site Design and Development by Tolitz Rosel.