kylecooper Posted April 20, 2008 Share Posted April 20, 2008 Hello, I have been coding CSS for years, now I need sort of a link box for featured sitewide links... The box is like a cell and there would be links and their description in it... I was wondering if one can do something like this in CSS... Otherwise explained: it would look like a Google AdSense ad box... Any ideas? Thanks for helping! Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/ Share on other sites More sharing options...
rilana Posted April 20, 2008 Share Posted April 20, 2008 Hi I think I would do that with spry... But I am not quite shour I understand what you wanna do. Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-521964 Share on other sites More sharing options...
kylecooper Posted April 21, 2008 Author Share Posted April 21, 2008 Hello Rilana, What I want to do is: a small cell (or table) which appears on every page of my site. The cell would contain a list of "reatured links". I will sell this ad space. My dilemma is: -> I have 2.500 + pages and they're all HTML with CSS -> I would like to have the same box (linkbox, like the Google ads box) on every page -> Would like it if the box had an external source code...such as CSS, so that I won't have to manually insert the code into all 2.500 + pages... Imagine the box like this: http://www.myrasoft.com/activesearchengine/ASEGoogleAdsense1.GIF So, it'll be sitewide... I'd be able to edit it from a single file. And the result will be visible on every page.... I just don't know how to do it... ??? Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-522640 Share on other sites More sharing options...
GameYin Posted April 23, 2008 Share Posted April 23, 2008 Is this the thread your talking about? Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-524777 Share on other sites More sharing options...
kylecooper Posted April 23, 2008 Author Share Posted April 23, 2008 Yep Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-525085 Share on other sites More sharing options...
haku Posted April 24, 2008 Share Posted April 24, 2008 Its not really doable with CSS. You could hard code the links into every page and then style them with one CSS sheet, but you will still have to code the links into each page first. This is better done with PHP or some other server-side language. Put the links all into one file and then include that file into each page at the bottom or what not. If you need to keep your files as .html, then you can either rename all your files with php and set up a mod re-write so that when someone adds .html it accesses the php file, or you can set up your server to parse html files as php. Honestly, you made a big deal about having used CSS for years, but I'm suspecting you aren't using as well as it could be used, or you would know this. A book or two on CSS probably would be a good thing. Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-526103 Share on other sites More sharing options...
kylecooper Posted April 24, 2008 Author Share Posted April 24, 2008 I've been using CSS, but not at a professional level, indeed... Had a few very simple sites. Until now I only coded CSS simply for text style, background. It's the first time I am using the table-CSS method and I'm getting the hang of it now Hmm, yes, I guess PHP would be better for those sitewide links... But this is quite rare, I wonder if there are people on this forum who know how to do it... :-\ Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-526211 Share on other sites More sharing options...
kylecooper Posted April 24, 2008 Author Share Posted April 24, 2008 Did I "make a big deal" about it? I thought I just said that I have a little experience... Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-526216 Share on other sites More sharing options...
haku Posted April 24, 2008 Share Posted April 24, 2008 But this is quite rare, I wonder if there are people on this forum who know how to do it... Its not a matter of knowing how to do it - it can't be done with CSS. You have to realize that CSS is for styling - it styles the markup. Effective usage of (X)HTML and CSS involves removing ALL styling from your markup - the (X)HTML - and then using CSS to style that markup. Its the separation of content and design. That's what CSS is made for. What you want to do is add links to each page. But links are content/markup. So CSS cannot create them. It can only do things to them after they have been created - it can choose colors, fonts, positions, text design etc. All stuff that is design. But unless they are present in the original code, CSS cannot do anything to them. As the links consist of both (X)HTML and CSS, CSS cannot include them into each page, which is why you would need a server side language to be able to do this. Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-526249 Share on other sites More sharing options...
kylecooper Posted April 24, 2008 Author Share Posted April 24, 2008 Sure, I know that CSS is for styling. I was hoping it was good for creating external links too... Guess not... I'll check out some PHP discussions... Quote Link to comment https://forums.phpfreaks.com/topic/101989-sitewide-linkbox-possible-with-css/#findComment-526409 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.