CSS - Is there a way to put several lines of HTML into one line using CSS?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CSS - Is there a way to put several lines of HTML into one line using CSS?
I've got a website set up which has a section which is just a bunch of links on the side. But this section of links is on every page of the website. And when I expand and add more links I don't want to have to go to every page and add the new link. Is there a way that I could put all the links into something on CSS (or anything else) that I could just include one line in the HTML? So that when I add a link I'll only have to edit the one file and and then every page will be updated?
You cannot do this with CSS as it is not designed for content. You can use either webserver technology such as SSI or something dynamic like JSP includes.
If you want to stick with something more static, then JavaScript is probably your only option. Personally, I would go with something more dynamic.
And there's no way I can just have a separate HTML file that I could somehow call or something from another HTML file? And it would just include whatever is in the called HTML file where it's "called" at?
I'm using space provided to me by the University I'm attending and I don't believe they allow for SSI.
And there's no way I can just have a separate HTML file that I could somehow call or something from another HTML file? And it would just include whatever is in the called HTML file where it's "called" at?
I'm using space provided to me by the University I'm attending and I don't believe they allow for SSI.
Thanks for your help.
CSS is used by the client to define the presentation of the content. In order to actively change the content, you will have to use server side technology. You can use a dynamic menu written in JavaScript, but this is client-side technology.
You can use an IFRAME, but this is not supported by XHTML 1.0 or HTML 4.1 Strict.
I'd just use php for this. Maybe your server supports that (most do nowadays). You can create a separate php file with the menu, or whatever, then just include it from your main php file(s).
And there's no way I can just have a separate HTML file that I could somehow call or something from another HTML file? And it would just include whatever is in the called HTML file where it's "called" at?
I'm using space provided to me by the University I'm attending and I don't believe they allow for SSI.
Thanks for your help.
i'm thinking...and this hasn't been tested..but uh did you try using the bg image tag to call the file? it looks something like this in the css script...
Silly question - are you just trying to keep a navigation section on
the page at all times? If so, that can certainly be achieved w/ css
and a plain (single) HTML file.
Silly question - are you just trying to keep a navigation section on
the page at all times? If so, that can certainly be achieved w/ css
and a plain (single) HTML file.
Cheers,
Tink
I'm not sure about chondeau but, me, ironicly yeah, but the problem isn't seperating the code its re-implimenting it into the file...should we do it your way, which sounds good, what's the line to throw it back into the given webpage.
On a side note: i 'm not using php (cuz I haven't leaned it yet) so I'm tryna figure out if I can use js to call the navigation and have it edit the code based on what page is loading. I guess something like: if - <ttitle> ="x" then = doc.write. etc etc get it?
And how do most major websites keep the navi with the other pages? (If I said that correctly)
I did a similar thing by making a quick templating tool in perl and make
which generates a website from templates.
I stuck my menu and logo on every page.
there may be proper tools to do this.
you can do it with js yes.
there are plenty of free CSS menu and js menu sites out there.
try cssplay.
a lot of CMS tools need an RDBMS as well, which may or may not be available
on your host.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.