471,881 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,881 software developers and data experts.

Floating went awry ... where did I?

Hi,

I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?

TIA,
Richard

Aug 12 '07 #1
13 1590
On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
Hi,

I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?

TIA,
Richard
Woops, I forgot http://home.comcast.net/~CaptQueeg/PositioningTest.htm

Sorry,
R

Aug 12 '07 #2
RichardL <Ri**********************@USComputerGurus.comwrite s:
On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
Hi,

I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?

TIA,
Richard

Woops, I forgot http://home.comcast.net/~CaptQueeg/PositioningTest.htm
Not commenting out most of your stylesheet might help...

Also, note the difference between id and class.
--
Jón Fairbairn Jo***********@cl.cam.ac.uk

Aug 12 '07 #3
RichardL wrote:
<RichardDummyMailbox58...@USComputerGurus.comwrote :
>I tried creating "left" and "right" links on the top of a page I'll
be building. I intended them to be on the opposite sides of the
first line. That failed. What am I missing?

Woops, I forgot http://home.comcast.net/~CaptQueeg/PositioningTest.htm
Part of the reason is likely the unclosed comment in your style sheet,
effectively rendering everything after it as .. nothing.

/* fonts: http://css.maxdesign.com.au/selectut...rial_step3.htm
*/
/* NOTE: No comma separators between names
font-family:Georgia Times "Times New Roman" Serif Sans-Serif;

etc. Why are there no commas between the font names? Why mix serif and
sans-serif? You should get in the habit of adding a semi-colon on the
last item in a style, too, so when you add more, they work.

Maybe this page will give you some ideas on how to float to both sides.
http://k75s.home.att.net/banner.html
--
-bts
-Motorcycles defy gravity; cars just suck
Aug 12 '07 #4
RichardL <Ri**********************@USComputerGurus.comwrite s:
On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
Hi,

I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?

TIA,
Richard

Woops, I forgot http://home.comcast.net/~CaptQueeg/PositioningTest.htm
You also forgot <http://jigsaw.w3.org/css-validator/>
--
Jón Fairbairn Jo***********@cl.cam.ac.uk

Aug 12 '07 #5
On Aug 12, 8:11 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
On Aug 12, 8:10 am, RichardL

<RichardDummyMailbox58...@USComputerGurus.comwrote :
Hi,
I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?
TIA,
Richard

Woops, I forgothttp://home.comcast.net/~CaptQueeg/PositioningTest.htm

Sorry,
R
Hi All,

Thank you very much for your reponses.

<Jn FairbairnYou also forgot <http://jigsaw.w3.org/css-validator/>

Mea culpa! I had intended to that before I posted, but I forgot
abuout it.

<Jn Fairbairn & BTSNot commenting out most of your stylesheet might
help...

Sloppy. Again, validating would have alerted me.

<Jn FairbairnAlso, note the difference between id and class.

I wasn't aware of this problem, particularly since the validators
didn't raise any red flags. But I think I'm closer to the mark now.

Why are there no commas between the font names?

Because I think that's the standard. Am I wrong?

<BTSWhy mix serif and sans-serif?

Because I thought the browser would go from left-to-right until it
found a font it had access to. I now found a set of fonts (with
credit in the comments) that one person recommends. How do they
strike you?

<BTSYou should get in the habit of adding a semi-colon on the last
item in a style, too, so when you add more, they work.

Point taken.

<BTSMaybe this page will give you some ideas on how to float to both
sides. http://k75s.home.att.net/banner.html

I think it will. I just wanted to post the corrctions I've
implemented so far. If you look, you'll see I'm almost there. I
don't have the "left" and "right" links living inside the banner, nor
pushed to the extremes. Banner.html will probably help with that.

Thank you all for your responses. They were GREAT.

Best wishes,
Richard

Aug 12 '07 #6
RichardL wrote:
<Jn FairbairnAlso, note the difference between id and class.

I wasn't aware of this problem, particularly since the validators
didn't raise any red flags. But I think I'm closer to the mark now.
If you used more than one ID on the page the HTML validator will
certainly let you know.
>
Why are there no commas between the font names?

Because I think that's the standard. Am I wrong?
Very much so. See:

http://www.w3.org/TR/CSS21/fonts.htm...ef-font-family

<cite>The value is a prioritized list of font family names and/or
generic family names. Unlike most other CSS properties, values are
separated by a comma to indicate that they are alternatives:

body { font-family: Gill, Helvetica, sans-serif }</cite>
^ ^
*note* *note*
>
<BTSWhy mix serif and sans-serif?

Because I thought the browser would go from left-to-right until it
found a font it had access to. I now found a set of fonts (with
credit in the comments) that one person recommends. How do they
strike you?
True, but why would you not select alternates of similar visual style?
If you wanted sans-serif (without serifs) why would you mix alternated
with serifs???
>
<BTSYou should get in the habit of adding a semi-colon on the last
item in a style, too, so when you add more, they work.

Point taken.
This is a very good tip. Will save needless time (hours sometimes) debugging
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Aug 12 '07 #7
RichardL wrote:
Why are there no commas between the font names?

Because I think that's the standard. Am I wrong?
Yes. You always use commas between font names, and quotes around fonts
with multiple words like "Trebuchet MS" .
<BTSWhy mix serif and sans-serif?

Because I thought the browser would go from left-to-right until it
found a font it had access to.
That part is true. I was wondering why you wanted to mix serif and
sans-serif fonts. Do you understand the difference?
I now found a set of fonts (with credit in the comments) that one
person recommends. How do they strike you?
Not well.

font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 90%;

Stand back about two feet from your monitor and read that "CSS Font
Specs" page. (There are many errors on that page; you should completely
forget about it as a reference.)

Then go to this page of mine:
http://k75s.home.att.net/fontsize.html
Note the section on Verdana as well.

That page said: "All the examples below are set at the same 12px font
size." No, they weren't. They were much smaller. There is no style named
"trebuchet" that I can find.

--
-bts
-Motorcycles defy gravity; cars just suck
Aug 12 '07 #8
On Aug 12, 3:28 pm, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
On Aug 12, 8:11 am, RichardL

<RichardDummyMailbox58...@USComputerGurus.comwrote :
On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
Hi,
I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?
TIA,
Richard
Woops, I forgothttp://home.comcast.net/~CaptQueeg/PositioningTest.htm
Sorry,
R

Hi All,

Thank you very much for your reponses.

<Jn FairbairnYou also forgot <http://jigsaw.w3.org/css-validator/>

Mea culpa! I had intended to that before I posted, but I forgot
abuout it.

<Jn Fairbairn & BTSNot commenting out most of your stylesheet might
help...

Sloppy. Again, validating would have alerted me.

<Jn FairbairnAlso, note the difference between id and class.

I wasn't aware of this problem, particularly since the validators
didn't raise any red flags. But I think I'm closer to the mark now.

Why are there no commas between the font names?

Because I think that's the standard. Am I wrong?

<BTSWhy mix serif and sans-serif?

Because I thought the browser would go from left-to-right until it
found a font it had access to. I now found a set of fonts (with
credit in the comments) that one person recommends. How do they
strike you?

<BTSYou should get in the habit of adding a semi-colon on the last
item in a style, too, so when you add more, they work.

Point taken.

<BTSMaybe this page will give you some ideas on how to float to both
sides. http://k75s.home.att.net/banner.html

I think it will. I just wanted to post the corrctions I've
implemented so far. If you look, you'll see I'm almost there. I
don't have the "left" and "right" links living inside the banner, nor
pushed to the extremes. Banner.html will probably help with that.

Thank you all for your responses. They were GREAT.

Best wishes,
Richard
Hi Y'all,

Thanks for these additional responses.

<JonathanSee: http://www.w3.org/TR/CSS21/fonts.htm...ef-font-family

Great link. I don't know my way around the standard yet, but I'll get
there ... he says hopefully :-)
BTW, it's interesting that the validator didn't wince at the lack of
commas. I guess it's not perfect.

<Jonathan... why would you not select alternates of similar visual
style?
I haven't even looked at those fonts. For now, I trying to get a set
that will satisfy almost all browsers and are aesthetically pleasing.
So I'll be happy to use anything recommended by people more
knowledgeable than me. In time, I'll see what I have wrought.

<BTSI was wondering why you wanted to mix serif and sans-serif
fonts. Do you understand the difference?
Yes, I know what serifs on fonts are. Beyond that, please note
previous response.

<BTSThen go to this page of mine: http://k75s.home.att.net/fontsize.html

Thanks. I'll make changes in my next incarnation, after I read your
page or put up a demo on fonts for myself.

My latest incarnation works pretty well, at least to my present humble
standards. However,
*** the validator fails the html ***.

The example I started with had [[<span class="bannerleft"><img
src="..." ... width="50" height="43" />]]
I went with [[<span class="BannerLeft" width="50" height="43"><a ...]]
That failed validation.

So I tried:

<div width="50" height="43">
<span class="BannerLeft"><a href="javascript:history.back()">&lt;
Prev</a</span>
</div>

That got no better reception from the validator. So my last question
is: what's the cool way to provide sizing for my link? And is there
any virtue to go without sizing?

Again, thanks for taking the time to respond a second time. I hope
I'm not going back to the well too often.

Best wishes
Richard


Aug 12 '07 #9
RichardL wrote:
That got no better reception from the validator. So my last question
is: what's the cool way to provide sizing for my link? And is there
any virtue to go without sizing?
I've lost what you are trying to do, mostly due to your odd quoting
style.

What is it you are trying to size?

I do note that your

..BannerCenter, .BannerLeft, .BannerRight {
font-size: 90%;

...is 90% of 90% (of the body).

Please don't indent your CSS file so much. Align the IDs and classes at
the left margin and use either three spaces or one tab to indent the
attributes.

Why not use <span>s for the left and right links, instead of <div>s?

--
-bts
-Motorcycles defy gravity; cars just suck
Aug 12 '07 #10
RichardL wrote:
On Aug 12, 3:28 pm, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
>On Aug 12, 8:11 am, RichardL

<RichardDummyMailbox58...@USComputerGurus.comwrot e:
>>On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwro te:
Hi,
I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?
TIA,
Richard
Woops, I forgothttp://home.comcast.net/~CaptQueeg/PositioningTest.htm
Sorry,
R
Hi All,

Thank you very much for your reponses.

<Jn FairbairnYou also forgot <http://jigsaw.w3.org/css-validator/>

Mea culpa! I had intended to that before I posted, but I forgot
abuout it.

<Jn Fairbairn & BTSNot commenting out most of your stylesheet might
help...

Sloppy. Again, validating would have alerted me.

<Jn FairbairnAlso, note the difference between id and class.

I wasn't aware of this problem, particularly since the validators
didn't raise any red flags. But I think I'm closer to the mark now.

Why are there no commas between the font names?

Because I think that's the standard. Am I wrong?

<BTSWhy mix serif and sans-serif?

Because I thought the browser would go from left-to-right until it
found a font it had access to. I now found a set of fonts (with
credit in the comments) that one person recommends. How do they
strike you?

<BTSYou should get in the habit of adding a semi-colon on the last
item in a style, too, so when you add more, they work.

Point taken.

<BTSMaybe this page will give you some ideas on how to float to both
sides. http://k75s.home.att.net/banner.html

I think it will. I just wanted to post the corrctions I've
implemented so far. If you look, you'll see I'm almost there. I
don't have the "left" and "right" links living inside the banner, nor
pushed to the extremes. Banner.html will probably help with that.

Thank you all for your responses. They were GREAT.

Best wishes,
Richard

Hi Y'all,

Thanks for these additional responses.

<JonathanSee: http://www.w3.org/TR/CSS21/fonts.htm...ef-font-family

Great link. I don't know my way around the standard yet, but I'll get
there ... he says hopefully :-)
BTW, it's interesting that the validator didn't wince at the lack of
commas. I guess it's not perfect.

The validator has no master list of all fonts, if you level out the
commas I believe it treats the list as one font name with embedded
spaces. You can bogus font names the validator will not know the difference.

font-family { "Some Bogus Font", apples, oranges, sans-serif; }
>
<Jonathan... why would you not select alternates of similar visual
style?
I haven't even looked at those fonts. For now, I trying to get a set
that will satisfy almost all browsers and are aesthetically pleasing.
So I'll be happy to use anything recommended by people more
knowledgeable than me. In time, I'll see what I have wrought.
Correct that is why if you select a sans-serif font your alternates
should also be sans-serif. You mixed the two...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Aug 13 '07 #11
On Aug 12, 9:35 pm, "Jonathan N. Little" <lws4...@centralva.net>
wrote:
RichardL wrote:
On Aug 12, 3:28 pm, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
On Aug 12, 8:11 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrote :
On Aug 12, 8:10 am, RichardL
<RichardDummyMailbox58...@USComputerGurus.comwrot e:
Hi,
I tried creating "left" and "right" links on the top of a page I'll be
building. I intended them to be on the opposite sides of the first
line. That failed. What am I missing?
TIA,
Richard
Woops, I forgothttp://home.comcast.net/~CaptQueeg/PositioningTest.htm
Sorry,
R
Hi All,
Thank you very much for your reponses.
<Jn FairbairnYou also forgot <http://jigsaw.w3.org/css-validator/>
Mea culpa! I had intended to that before I posted, but I forgot
abuout it.
<Jn Fairbairn & BTSNot commenting out most of your stylesheet might
help...
Sloppy. Again, validating would have alerted me.
<Jn FairbairnAlso, note the difference between id and class.
I wasn't aware of this problem, particularly since the validators
didn't raise any red flags. But I think I'm closer to the mark now.
Why are there no commas between the font names?
Because I think that's the standard. Am I wrong?
<BTSWhy mix serif and sans-serif?
Because I thought the browser would go from left-to-right until it
found a font it had access to. I now found a set of fonts (with
credit in the comments) that one person recommends. How do they
strike you?
<BTSYou should get in the habit of adding a semi-colon on the last
item in a style, too, so when you add more, they work.
Point taken.
<BTSMaybe this page will give you some ideas on how to float to both
sides. http://k75s.home.att.net/banner.html
I think it will. I just wanted to post the corrctions I've
implemented so far. If you look, you'll see I'm almost there. I
don't have the "left" and "right" links living inside the banner, nor
pushed to the extremes. Banner.html will probably help with that.
Thank you all for your responses. They were GREAT.
Best wishes,
Richard
Hi Y'all,
Thanks for these additional responses.
<JonathanSee:http://www.w3.org/TR/CSS21/fonts.htm...ef-font-family
Great link. I don't know my way around the standard yet, but I'll get
there ... he says hopefully :-)
BTW, it's interesting that the validator didn't wince at the lack of
commas. I guess it's not perfect.

The validator has no master list of all fonts, if you level out the
commas I believe it treats the list as one font name with embedded
spaces. You can bogus font names the validator will not know the difference.

font-family { "Some Bogus Font", apples, oranges, sans-serif; }
<Jonathan... why would you not select alternates of similar visual
style?
I haven't even looked at those fonts. For now, I trying to get a set
that will satisfy almost all browsers and are aesthetically pleasing.
So I'll be happy to use anything recommended by people more
knowledgeable than me. In time, I'll see what I have wrought.

Correct that is why if you select a sans-serif font your alternates
should also be sans-serif. You mixed the two...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
Thanks Jonathan,

I'm on a roll now <g Many thanks.

Richard

Aug 13 '07 #12
Beauregard T. Shagnasty wrote:
>
I've always found it easier to float spans rather than divs.
Why would it matter? A span will automatically become a block element
when it's floated.

You should mark it up according what the context is when CSS isn't
applied. Sometimes it isn't crystal clear what markup is best, but there
is a distinct difference between div and span.

--
Berg
Aug 13 '07 #13
Bergamot wrote:
Beauregard T. Shagnasty wrote:
>I've always found it easier to float spans rather than divs.

Why would it matter?
Purely a personal preference. By "easier", I didn't mean less work, only
that is seems to define a part inside a part.

--
-bts
-Motorcycles defy gravity; cars just suck
Aug 13 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Michael Bernstein | last post: by
2 posts views Thread by Lee K. Seitz | last post: by
1 post views Thread by bryanrite | last post: by
687 posts views Thread by cody | last post: by
21 posts views Thread by Allin Cottrell | last post: by
31 posts views Thread by Martin Clark | last post: by
4 posts views Thread by john | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.