rdub
12-02-2006, 02:25 PM
Can I include my link info in an external css?
|
Click to See Complete Forum and Search --> : href in external css rdub 12-02-2006, 02:25 PM Can I include my link info in an external css? Patton 12-02-2006, 02:33 PM You can use this <link href="cssfile.css" rel="stylesheet" type="text/css"> Or: <style type="text/css"> <!-- @import url("cssfile.css"); --> </style> The above code is good is you want to have styles on the page, and have external ones, or if you want to have more than 1 sheet attached. Remember, in the CSS file, you do not need to start with "<style type="text/css"> and end with "</style>". Your CSS file just start with CSS, example, your CSS file could look like this: p { color: #000000; } Just doesn't require an starting and ending tag. THese do go in hte <head></head> part of your site. Hope thats helpful. :) rdub 12-02-2006, 03:13 PM OK. Instead of using <link rel="stylesheet" href="nav.css"> I would use <link href="cssfile.css" rel="stylesheet" type="text/css"> and I could include the link in the css file instead of the html, is that correct? ryanbutler 12-02-2006, 03:58 PM You include this: <link href="cssfile.css" rel="stylesheet" type="text/css"> inside the HTML file. rdub 12-02-2006, 04:14 PM To clarify, I could include a link, say to www.invisiongrafix.com, within the external css file as part of a navigation bar? _Aerospace_Eng_ 12-02-2006, 04:29 PM No CSS can't have html in it. It is only for styling the html. You'll need to look into server side includes if you want certain links to be on all of the page. rdub 12-02-2006, 04:36 PM Perhaps I could use php and mysql and format the results through an exteral css. What do you thinK? _Aerospace_Eng_ 12-02-2006, 04:42 PM I guess I'm not sure what you are asking. Explain your self better. You want to include a url in your external stylesheet? Or you want to use an external CSS but you only want it to apply to your navigation? rdub 12-02-2006, 04:48 PM What I'm trying to accomplish is only having to make changes to a navigation bar once and have it be reflected on all pages of a website. If I can't include the various links in the external css, perhaps using php and mysql, with formatting of results with external css, might work. If I have a 40 page site, it would become time consuming to have to make changes to all 40 pages if there is a slight change or an addition in one of the links in the navigation bar. Hope that clarifies. WebJoel 12-02-2006, 05:07 PM http://www.tizag.com/phpT/include.php webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |