|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Zealot
![]() ![]() Join Date: Jan 2008
Location: Hot Springs, Montana
Posts: 195
|
css toggles?
Does CSS have toggle selectors? I'm working through an article I've read (http://randsco.com/_miscPgs/cssZoomPZ3.html) and am trying to reconcile the CSS with the (x)html.
The author uses some classes ("Bdr," "Cap," and "Lnk") that I don't see in the CSS. In the same article the auth refers to them as toggles. "In the above example the following toggles are set in the <div> classnames: Bdr/noBdr; Cap/noCap; Lnk/noLnk." (Or, are these javascript functions?) Thanks as always!! EDIT: in this same css, what does this notation mean/do? "html>/**/body" HTML4Strict Code:
CSS Code:
|
|
|
|
|
|
#2 | ||
|
CSS Guru in Training
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,673
|
Quote:
Quote:
That code is very hacky and is written poorly. In short you will never need to know what that code fully does. |
||
|
|
|
|
|
#3 |
|
SitePoint Zealot
![]() ![]() Join Date: Jan 2008
Location: Hot Springs, Montana
Posts: 195
|
THanks Ryan. The author said the solution (to posed problem) didn't require js so I was a bit confused on that. Apparently auth was styling with js, then.
|
|
|
|
|
|
#4 | |
|
CSS Guru in Training
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,673
|
Quote:
He makes the image big by default, but sets it to 100% of the anchors width/height, and on hover he sets the width/height back to auto Code:
.PZ3zoom a:hover { position:absolute;
z-index:999; padding:0; background:none;
cursor:default; height:auto; width:auto;
overflow:visible; border:1px solid #369;
margin:-1px 0 0 -1px; }
html>body .PZ3zoom a:hover { margin:-1px -1px 0 -1px; }
.PZ3zoom a img { border:0; height:100%; width:100%; }
.PZ3zoom a:hover img { height:auto; width:auto;
border:0; }
|
|
|
|
|
|
|
#5 |
|
SitePoint Zealot
![]() ![]() Join Date: Jan 2008
Location: Hot Springs, Montana
Posts: 195
|
Thanks for articulating this tactic. Clever, from my perspective. Do you see any major drawbacks to this approach?
|
|
|
|
|
|
#6 |
|
CSS Guru in Training
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,673
|
Umm....not that I see really. My philosophy is, try something until it breaks
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 16:43.










Linear Mode
