navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

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
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Expression Web Help >> How to include block of CSS code to insert inside { ... } of id#{ }?
Page: [1]
 
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
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: How to include block of CSS code to insert inside {... - 5/17/2007 8:27:49   
So what you're basically doing is changing a hover state?

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to avi_m)
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




(in reply to jaybee)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: How to include block of CSS code to insert inside {... - 5/17/2007 11:32:05   
quote:

#masthead a class = "Pressed"
No.

Take a look at http://www.cycling-services.co.uk/

You'll see the Home button is highlighted. Then click Contact you'll see that one is then highlighted. Go down the bottom, click Privacy Policy, same thing.

Is that what you're trying to do? If so, take a look at the code and css for the site and you'll see how it's done. If I'm way off beam here then perhaps an example would help.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to avi_m)
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

_____________________________


(in reply to jaybee)
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


(in reply to jaybee)
Tailslide

 

Posts: 6272
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: How to include block of CSS code to insert inside {... - 5/17/2007 16:50:27   
We've been here before haven't we Avi? Bet you're ready to throw the computer out the window! :)

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to avi_m)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: How to include block of CSS code to insert inside {... - 5/17/2007 17:17:39   
quote:

What is the following META for?
Google verification.

quote:

Also, if I understand the coding right, on the highlight the key is "body id=" for the highlight?
Correct

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Tailslide)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: How to include block of CSS code to insert inside {... - 5/17/2007 17:19:35   
quote:

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.


Bums!

How about killing the DWTs? :)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
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:41:43   
Hi Jaybee,

>> Bums!

>> How about killing the DWTs? :)


But DWTs are so goood ....!


This sort of bug is what seems to make so many people want to throttle MS and its most famous person: MS gives great stuff and then smashes it up in some basic way, e.g., like Word's inability to do reliable auto numbered and auto bulleted lists.

avi






(in reply to jaybee)
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


(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Expression Web Help >> How to include block of CSS code to insert inside { ... } of id#{ }?
Page: [1]
Jump to: 1





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