Forum Moderators: not2easy

Message Too Old, No Replies

Can I specify links in a stylesheet?

         

saidivya

3:39 pm on Apr 18, 2009 (gmt 0)

10+ Year Member



Hello All,

I am preparing a website in CSS and now I have a question whether we can put href that is can we specify the links in stylesheet page itself.

Actually, I have navigation menu and for what ever the page I have created I need to again copy and paste the links and names info...for what ever the # of pages I have created the code is duplicating...Is there any way that we can make put the navigation menu info in style sheet and get that reference in the html pages...

I really appreciate your help in solving this problem.

Thanks in advance

Regards,
Divya

simonuk

7:21 pm on Apr 18, 2009 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld!

You can't add the links to the CSS. It sounds to me like you need to investigate content management systems as these would be a good choice if you have a large site in the making and need to control content, styles and CSS.

rocknbil

8:33 pm on Apr 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...Is there any way that we can make put the navigation menu info in style sheet and get that reference in the html pages...

What you want here is most likely Server Side Includes or PHP pages using an include.

In either scenario, the navigation exists in a plain text file and is "included" in the page output wherever you put it. The CSS of the page containing the include controls the styling.