Can Frame Styles be Included in a CSS File for Web Design?

  • Thread starter neurocomp2003
  • Start date
In summary, the conversation discusses using frame styles in a CSS file, the difficulty of using frames for website layout, and the suggestion to use scripting languages like PHP instead. The use of client-side includes is also mentioned as an alternative to frames, but it may require duplicate pages or restructuring of folders. The conversation also mentions a utility for generating MathML and a question about references for browser compatibility.
  • #1
neurocomp2003
1,366
3
sup, does anyone know if you can stick frame styles in a css file?
best
neurocomp2003
 
Computer science news on Phys.org
  • #2
Do you mean borders? I know how to do borders.
 
  • #3
no I'm talking about frames. and placing their attributes in a css file like you would any other attribute.
 
  • #4
Ek, frames :yuck:

I don't think you can stick multiple frame styles into one css file. The reason being is that your dealing with multiple DOM stuctures.
 
  • #5
dduardo. quick question.
i have 5 frames on my main page..wchih i will be constantly switching the contents of 3 of them(say over 100-1000pages). The reason I stuck with frames is because its easier and i don't have to repaste a lot of organization structure to maintain it.

ooooooooooooo
ooooooooooooo
xx...xx
xx...xx
xx...xx
---------------
ooooooooooooo
ooooooooooooo

Thats the gist of what it looks like.
Now if i really wanted to move to tables...will it be easy? will the basica layout be easy to manipulate as a table(because the first time i tried, i really messed things up with the alignment. Note that the title/end will be the same page but the TOC/main/nav bar will change. IF your willing to take a look at the basic structure. I can email it to you if you can provide your remail.
 
  • #6
Ek, tables for layout :yuck:

You should do something like this:

Code:
<div id="header"></div>
<div id="content">
          <div id="leftContent"></div>
          <div id="centerContent"></div>
          <div id="rightContent"></div>
</div>
<div id="footer"></div>

See this example:

http://www.realworldstyle.com/nn4_3col_header.html

Then stick all your content inside the div blocks.
 
Last edited:
  • #7
thanks fro the example but i don't think its waht I'm looking for.
Because looking at the source code for that: If i wanted to swap images/code/formula..constantly...i'd have to duplicate the same page with the rest of the contents being the same and only one line changed for image...because I'm unfamiliar with coding in javascript...i don't even know if you can do that put a place marker on a region where the contents is determined by what the user is looking at and not have to duplicate teh contents.
 
  • #8
You can follow this code to do client-side includes:

http://www.boutell.com/newfaq/creating/include.html

But the preferred way is to use server-side includes.

Who is hosting your website? If they support php then it is just a matter of doing something like this:

Code:
<?php require("header.php"); ?>
 
  • #9
yeah i think I'm a long way from learning php =] but i'll look into it.
thanks for the advice though. Its much appreciated. As for hosting either a friend or rogers. Oh yeah and thanks for the above link on clientside stuff.

oh one more question...what would i use to put math symbols on a website?
Latex/mathematica/mathxhtml(i think its called)?
 
Last edited:
  • #10
You'll want to use MathML if your doing pure client based webpages. Unfortunetly, the code looks nasty:

[/code]
<math>
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mrow>
<mo>-</mo>
<mi>b</mi>
</mrow>
<mo>&PlusMinus;</mo>
<msqrt>
<mrow>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>-</mo>
<mrow>
<mn>4</mn>
<mo>&InvisibleTimes;</mo>
<mi>a</mi>
<mo>&InvisibleTimes;</mo>
<mi>c</mi>
</mrow>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mo>&InvisibleTimes;</mo>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
</math>
[/code]

It is much nicer to do using latex:

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

[tex]x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}[/tex]

But you'll need to do the parsing server-side.
 
  • #11
dduardo: do you know of any book that teachs that stuff you listed.
Again thank you for all the help
 
  • #13
neurocomp2003, I seriously recommend that you use one of the scripting languages out there (preferably php). Frames? I really hate frames, they do have their purpose though... but 5 on a page...
 
  • #14
yes...unfortunately I'm a novice at this so frames is easiest...i haven't learned the include style that dduardo referenced to above. And I'm not ready to learn becuase there is quite a bit more fundamentals you got to learn before you reach tthat point.

With frames...i can just easily remove a webpage and replace it with the one demanded on by a click. And its going to be a website of maybe 100-1000 pages of content with maybe 4-5 colours schemes. and different subject TOC.
 
  • #15
DDuardo: just wanted to thank you again. The link above with teh clientside
includes works like a charm...its a bit more hassle(quite a bit of tweaking) then frames but hopefully i won't have any issues with mozilla using includes like i did using frames(mozilla screwed up my dir. tree or IE has defaults that auto link perfectly). Now i have both to work with, but will eventually choose one and can go show my buddy whose suppose to be working on thise with me and let him choose.

The only problem i have with client side is that for every page of content I want I need a duplicate page to hose the structure of the layout unless of course I dump the content into the same page which i don't really want...but meh.

EDIT: bah ran into a second problem...if you have a directory tree and are including files from different folders. The links of those files are not relative to them but to the host page that has the includes... guess i'll have to restructure the folders

EDIT: argh is there a reference that tells you what not to use in IE becasue of other browsers like mozilla. My scrollbar technique doesn't work in mozill.a
again I'm grateful for your help.
Best
 
Last edited:

1. What are frames in web design?

Frames in web design are a way to divide a web page into multiple sections, each with its own scroll bar. This allows for multiple HTML documents to be displayed within a single web page.

2. How do I create frames in my website?

To create frames in your website, you can use the tag in your HTML code. This tag allows you to specify the layout of your frames, including the number of frames, their sizes, and the source of each frame's content.

3. What is the purpose of using CSS in web design?

CSS, or Cascading Style Sheets, is used in web design to control the presentation and layout of a web page. It allows for a separation of content and design, making it easier to maintain and update a website's appearance.

4. How do I use CSS to style my frames?

You can use CSS to style your frames by targeting the or