471,618 Members | 1,308 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

offsets in inline elements

I'm trying to make this page:

http://www.frostjedi.com/terra/scrip...ne-offset.html

Look like this page:

http://www.frostjedi.com/terra/scrip...at-height.html

ie. I'm trying to achieve the same effect that I do with floated block
level elements with inline elements and am having some difficulty.
For one, when using inline elements, there are three lines of text
whereas with floats there are just two.

I guess I could maybe add a span tag to the stuff after the <br />,
but is there a way to do it without adding any new elements?

Nov 10 '07 #1
1 1648
yawnmoth wrote:
I'm trying to make this page:

http://www.frostjedi.com/terra/scrip...ne-offset.html

Look like this page:

http://www.frostjedi.com/terra/scrip...at-height.html

ie. I'm trying to achieve the same effect that I do with floated block
level elements with inline elements and am having some difficulty.
For one, when using inline elements, there are three lines of text
whereas with floats there are just two.

I guess I could maybe add a span tag to the stuff after the <br />,
but is there a way to do it without adding any new elements?
Why do you want to replace floats with inline elements? Inline elements
are /highly/ constrained in what they can have--for example, a <br />
tag. The main purpose for inline elements is for styling a group of
words in a block of text (think ABBR, A, SPAN, etc.), so they lose a lot
of properties.

Perhaps you might try using inline blocks instead? An inline box is a
box that is kept in inline flow (think images).

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Nov 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phillip Farber | last post: by
46 posts views Thread by DJ WIce | last post: by
10 posts views Thread by yawnmoth | last post: by
12 posts views Thread by Eric Lindsay | last post: by
9 posts views Thread by Bill Norton | last post: by
37 posts views Thread by Prisoner at War | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | 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.