View Full Version : in-line css
rmridgew
06-03-2002, 21:07/09:07PM
does anyone know of any true font size control tags (ie:14px) that work within the font tag itself. or is there any way to use a class that is not defined in the page itself, but cued remotely.
im sure that this question is a bit unclear but it is the only way i could think to word it.
this has to do with banner ads
highman
07-03-2002, 05:05/05:05AM
I think you are asking if you can control the font sixe for a certain area of text?
If so then use;
<p class="bannertext">Text you are controlling goes here</p>
in your page
in your external stylesheet use;
.bannertext { FONT-FAMILY: Arial,Helvetica,San Serif;
FONT-SIZE: 14px;
FONT-WEIGHT: normal;
color:#000000;
text-decoration: none;
}
and call the stylesheet using;
<link rel="stylesheet" type="text/css" href="mystylesheet.css">
hope thats what your after :)
markymark
07-03-2002, 07:06/07:06AM
The in-line version would be <font face="arial, helvetica" style="font-size: 14px;"></font>
pageoneresults
07-03-2002, 14:56/02:56PM
Hey highman, is it necessary to assign a font-family attribute to all of the css tags or can I just use the attribute in the body tag of my css?
body{
font-family:"verdana", arial, helvetica, sans-serif;
I'm trying to trim down css now and I'm doing some testing. I've removed all font-family attributes from all tags other than the body tag and it seems to work. Although I'm not using a majority of the tags now that CSS and <div> tags have come into my life.
What I'm trying to do is have one font-family attribute that controls all of the fonts for all tags. Is the above the correct way to do that?
So now the above example would become...
.bannertext {
font-size: 14px;
font-weight: normal;
color:#000000;
text-decoration: none;
}
I do realize that if a page uses different fonts that the font-family attribute will need to be applied to that element using a class.
highman
07-03-2002, 15:08/03:08PM
Yes it should cascade down
>I'm trying to trim down css now and I'm doing some testing.
lol.... me to my css file is now twice the size of the index page :rolleyes:
I have also removed all image calls in the html, its looking very lean now, like you I now need to trim the css down as far as possible.
One other tip, put a call to your .css file in the bottom of the html as well as the top..... just in case the browser misses it first time ;)
pageoneresults
07-03-2002, 15:20/03:20PM
One other tip, put a call to your .css file in the bottom of the html as well as the top..... just in case the browser misses it first time.Are you seeing problems with the external style sheet not loading on first visits?
Also, the cascading is not working in NS4.7. I had to put the font-family attribute back into the form, input, p, select, td, textarea, and tr classes.
highman
07-03-2002, 15:46/03:46PM
>Are you seeing problems with the external style sheet not loading on first visits?
I have seen it once while testing, so now I call it again at the bottom of the html just to be sure, with the whole of the page depending on the stylesheet it just makes me more confident :)
highman
07-03-2002, 16:26/04:26PM
pageone, have you tried putting the font family in your div.body and not the .body?
One other thing i found out today while trying to call all the pages template images as background images in the <div>
Netscape gets very confused if your stylesheet is in its own folder, i.e not in the same directory as the page calling it, if you put the stylesheet in the root with your page you can call all the images in using
}
background-image: images/myimage.gif;
}
For ever learning eh !
pageoneresults
07-03-2002, 16:31/04:31PM
I haven't seen any issues yet with NS getting confused with the css being in its own sub-directory. I have noticed that when you increase or decrease font size in NS4.7 that the div width's are affected, they end up shrinking in size. As soon as you hit reload, all is back to normal.
NS4.7 does not understand the background-image element and there is a workaround...
This one works for NS6+ and IE along with Opera.
background-image:url('/working/images/gradation.jpg');
This is the workaround for NS4.7.
layer-background-image:url('/working/images/gradation.jpg');
pageoneresults
07-03-2002, 16:37/04:37PM
I'm currently experiencing issues where the <div> height is not what I specify. I have a left navigation element that I specified a <div> height of 100%. Unfortunately is does not span 100% of the window height, only about 70% of it. For now, I had to specify a height of 1200px whilst I figure out the problem.
highman
07-03-2002, 16:38/04:38PM
Pageone, you have seen the issue its what you describe as the work around for NS 4.7, if the css is in the same directory then all is sweet, makes it easier to develop a site because you dont have to use full url's
The font resize is a bug in NS, not in css, also happens on screen resize
pageoneresults
07-03-2002, 16:41/04:41PM
Makes it easier to develop a site because you dont have to use full url's.You posted right after I made the change above. You don't have to use full URL's, I just found that out with further testing. Is your background-image element working in NS4.7?
highman
07-03-2002, 16:48/04:48PM
Hi,
div.candsearchhead {
background-image : url(assets/pics/searchboxtop.gif);
}
works in NS 4.7 as long as the stylesheet is in the same directory as the page calling it.
I only have 1 image now being called through html :cool:
I'm currently experiencing issues where the <div> height is not what I specify. I have a left navigation element that I specified a <div> height of 100%. Unfortunately is does not span 100% of the window height, only about 70% of it. For now, I had to specify a height of 1200px whilst I figure out the problem.
<div> height is not a valid css call I believe, why do you want to fix the height ?
I just let it expand downwards with the content
p.s do you use ICQ?
pageoneresults
07-03-2002, 16:58/04:58PM
I tried moving the css to the root and took away the layer-background-image element and it did not work. Put it back in and of course it worked again.
You can see what I'm working with at...
Davidson Staffing (http://www.davidsonstaffing.com/working)
Note: Gradient 3 is the version we are working with. Gradient 1 came from their ad agency and I told them it would not work that way so we developed two options for them and they chose 3 which was our preference.
I have a tile image that measures 189 x 9 and it is tiling vertically to fill the background of the <div>. Then I have another <div> positioned above it that contains the navigation links.
Don't use any messenging services, sorry.
P.S. <div> height is a valid css attribute. What I need to do is make sure that left background navigation <div> extends the full height of the window no matter how much or how little content there is.
highman
07-03-2002, 17:10/05:10PM
Not sure why that is not working for you and it is for me..... wierd
The background thing (assuming you want black to underfill the gradient?)
Ditch <div class="gradation"></div>
use in your body tag
<body bgcolor="#FFFFFF" background="bground.gif">
where bground.gif is 1 px high and is 2000 px wide, the black vertical bar is created by making say 200px of bground.gif black (to the left)
The height attribute is marked in red (not valid) in TopStyle Pro
:confused:
highman
07-03-2002, 17:12/05:12PM
btw...
code looking real sweet :) brings back memories of discovering the 404 thing and what that did for us was amazing, this will provide similar results :cool:
highman
07-03-2002, 17:18/05:18PM
ahhh..... just looked at your css, remove the '/'
background-image:url('/working/images/gradation.jpg');
becomes
background-image:url('working/images/gradation.jpg');
see if that does it
pageoneresults
07-03-2002, 17:26/05:26PM
That still didn't work. I need to devote some more time this evening to see if I can get it to work per your instructions. I may have missed something, I'm brain dead right now!
rmridgew
07-03-2002, 17:52/05:52PM
I am trying to control my banner text when it is on someone elses page
thanks markymark, worked like a charm
highman
07-03-2002, 17:58/05:58PM
Sorry rmridgew
guilty as charged, didnt read the title properly and then got carried away on the css thing......sorry
glad you got a result though :)
pageoneresults
07-03-2002, 18:20/06:20PM
Actually rmridgew, I took the thread off course with my first reply about the font attribute, sorry! I'll take the heat!
markymark
09-03-2002, 06:51/06:51AM
Well, it's good to know that one of us is on the ball ;) . Anyhows, don't stop now Highman and PageOne, I am following this with great interest. My next couple of sites are going to be completely css driven, so all the info and workarounds here will save me inordinate amounts of coding time.
highman
09-03-2002, 09:42/09:42AM
Has anyone come across the exploding page scenario?
In NScape if you have an odd <b> or </b> or <p> or </p> in a page <div> (it can happen with snippets pulled from a db) then the page <divs> completely lose their absolute positioning, but only in NScape.
I cant seem to find the answer to the problem anywhere.....
pageoneresults
09-03-2002, 11:35/11:35AM
You must be referring to the Netscape Resize Fix which is available to users of Dreamweaver as an add in extension. I was reading about it here...
Mako 4 CSS (http://mako4css.com/TMat.htm)
Any of you DW users care to share the code with us?
Blue
09-03-2002, 13:10/01:10PM
Running it externally it would look like this:
<script language="JavaScript" src="/path_to_the_.js_file"></script> function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
pageoneresults
09-03-2002, 15:32/03:32PM
Loaded that script up and it's not working. I'm beginning to wonder if I have a buggy version of NS4.7! Have you tried it Blue? If so, can you take a look at my js file and tell me if something is amiss?
SEO Consultants JavaScript (http://www.seoconsultants.com/javascript/seo-consultants-index.js)
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.