|
| |
How to include block of CSS code to insert inside { ... } of id#{ }?
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
avi_m
Posts: 11 Joined: 5/13/2007 Status: offline
|
How to include block of CSS code to insert inside { ...... - 5/17/2007 8:19:30
While on the subject of includes, anybody know if there a way of doing an include of a block of CSS code. I have this in the header area of a DWT: #masthead a { /* Keep button for current page "pressed"*/ color: #FFDDEB; text-decoration: none; /* 3-D - Non-pushed ... */ background-color: #FF468B; position: relative; top: 1px; left: 1px; border-color: #000 #aaa #aaa #000; } Don't ask why - it just has to be there. Now how can I take just that block of CSS (inside the { } ) and make it external and just have a macro type thing that would represent it. In the C language I could somewhere define a macro something like this: define Pressed \ color: #FFDDEB;\ text-decoration: none;\ /* 3-D - Non-pushed ... */\ background-color: #FF468B;\ position: relative;\ top: 1px;\ left: 1px;\ I mean that I need that the following has to remain in the DWT: #masthead a { /* Keep button for current page "pressed"*/ Pressed } and the definition for Pressed is outside, in an external style sheet or something. Can this be done? I need to use the CSS code for Pressed in other places, but apparently the definition for #masthead a has to be here in the DWT. Thanks, avi
|
|
|
|
avi_m
Posts: 11 Joined: 5/13/2007 Status: offline
|
RE: How to include block of CSS code to insert inside {... - 5/17/2007 10:45:33
yup, you got very "warm", jaybee. In fact, I am trying to implement a pure CSS method of keeping "alight" the navigation button coresponding to the current (sub)page on a site and making it work with DWTs. I have the #masthead thing inside an editable region in the header area, andfor each diff page attached to the DWT I simply change is to #about_the_site or #contact_us or whatever, and then the usual id thing in the <li> items in the vertical nav bar I have. The thing is, is this chunk of CSS code, color: #FFDDEB; text-decoration: none; /* 3-D - Non-pushed ... */ background-color: #FF468B; position: relative; top: 1px; left: 1px; border-color: #000 #aaa #aaa #000; is going to be used elsewhere so I wanted to keep it in one global location and here have a reference to it instead of the CSS code itself. At one other forum, it really threw all the experts, and it seems it cant be done, ie to express an ID selector in terms of a class. Hang on, can' I do something like: #masthead a class = "Pressed" ? tia - avi
|
|
|
|
Reflect
Posts: 4769 From: USA Status: offline
|
RE: How to include block of CSS code to insert inside {... - 5/17/2007 12:35:44
JB, What is the following META for? <meta name="verify-v1" content="eZ+rRDDzcAtcId4MvH2gJem9NKaBMOltWcb/DEoav8Q=" /> Also, if I understand the coding right, on the highlight the key is "body id=" for the highlight? If so that is slick, nice solution. Take care, Brian
_____________________________
|
|
|
|
avi_m
Posts: 11 Joined: 5/13/2007 Status: offline
|
RE: How to include block of CSS code to insert inside {... - 5/17/2007 15:55:58
Yup, jaybee, that's exactly what I want to do - just like in the cycling site. The problem is... ...that that method does not work with EW DWTs. And why does it not work with EW DWTs... coz that critical piece of code: <body id="access"> is going to get reinited (=reinitialized) when the DWT does an update. So, you say, put it inside an editable region. Good idea, it's just that EW ignores an editable region surrounding the <body> tag .... would you believe. Now would we call that a "design decision"? Forgetfullness on behalf of MS? Or just a plain bug? tnx - avi
|
|
|
|
avi_m
Posts: 11 Joined: 5/13/2007 Status: offline
|
RE: How to include block of CSS code to insert inside {... - 5/22/2007 3:47:07
Hi Tailslide, >> We've been here before haven't we Avi? Bet you're ready to throw the computer out the window! Yep, I sure have been here before. I had originally thought that there would be a pot of gold at the end of the rainbow., i.e., I just have to ask enough experts in enough forums to find out how to make my CSS current page indicator and I would learn something really fundamental and great about CSS / EW that would make the whole long journey worth the while. Now, at the end of the road, it has turned out to be one of those famous MS bugs that make you want to throttle Uncle Bill (see my other recent post on this thread). How do you file a bug report to MS about EW? tia avi
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|