By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Breaks in between display: inline's ?

P: n/a
Mat
<div id="container">
<div id="main">
<div id="header">
<p class="Address">123 Fake Street, </p>
<p class="City">Crazy City, </p>
<p class="Province">Ontario </p>
<p class="PostalCode">H0H 0H0</p>
<p class="Telephone">Telephone: 555-1234 </p>
<p class="Fax">Fax: 555-4321</p>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

What I need to do is get the following result:

<!-- the following two lines should be centered -->
123 Fake Street, Crazy City, Ontario H0H 0H0
Telephone: 555-1234 Fax: 555-4321
<!-- the rest should be normal, or left-aligned -->
Hello whatever blah blah

The only way I was successfully able to do this was by creating a new
div that I named "centerRow" which I wrapped around the two rows I
wanted (ie, the first centerRow div wrapped around Address, City,
Province and PostalCode, and the second centerRow div wrapped around
Telephone and Fax). I absolutely want to avoid this. I want to avoid
any type of formatting in the actual HTML. Already having the
"header" div is pushing it.

Here's what I've tried so far:

#header { text-align: center; margin-left: auto; margin-right: auto; }
#header p.Address { float: left; }
#header p.City { float: left; }
#header p.Province { float: left; }
#header p.PostalCode { }
#header p.Telephone { float: left; }
#header p.Fax { }

The floats simply left-align anything regardless of any centering I've
attempted to do in parent containers etc. So the other solution would
have been:

#header { text-align: center; margin-left: auto; margin-right: auto; }
#header p.Address { display: inline; }
#header p.City { display: inline; }
#header p.Province { display: inline; }
#header p.PostalCode { display: inline; }
#header p.Telephone { display: inline; }
#header p.Fax { display: inline; }

Problem here is that there's no way (that I know of) to put a break
between PostalCode and Telephone.

Any suggestions? And don't tell me to add a BR!!! =)

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/
Jul 21 '05 #1
Share this Question
Share on Google+
23 Replies


P: n/a
Mat wrote:
What I need to do is get the following result:

<!-- the following two lines should be centered -->
123 Fake Street, Crazy City, Ontario H0H 0H0
Telephone: 555-1234 Fax: 555-4321
<!-- the rest should be normal, or left-aligned -->
Hello whatever blah blah


How about this? It's an address, correct?

<head>
<style type="text/css">
#header { text-align: center; margin-left: auto; margin-right: auto; }
address { font-style: normal; }
</style>
</head>
<body>

<div id="container">
<div id="main">
<div id="header">
<address>123 Fake Street, Crazy City, Ontario H0H 0H0</br>
Telephone: 555-1234 Fax: 555-4321
</address>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

</body>
</html>

--
-bts
-This space intentionally left blank.
Jul 21 '05 #2

P: n/a
me
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:3a*************@individual.net...
Mat wrote:
What I need to do is get the following result:

<!-- the following two lines should be centered -->
123 Fake Street, Crazy City, Ontario H0H 0H0
Telephone: 555-1234 Fax: 555-4321
<!-- the rest should be normal, or left-aligned -->
Hello whatever blah blah


How about this? It's an address, correct?

<head>
<style type="text/css">
#header { text-align: center; margin-left: auto; margin-right: auto; }
address { font-style: normal; }
</style>
</head>
<body>

<div id="container">
<div id="main">
<div id="header">
<address>123 Fake Street, Crazy City, Ontario H0H 0H0</br>
Telephone: 555-1234 Fax: 555-4321
</address>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

</body>
</html>


Whoops-e-daisy. This is wrong: </br> :-(
Signed,
me
Jul 21 '05 #3

P: n/a
me wrote:
Whoops-e-daisy. This is wrong: </br> :-(


Typo. It still worked in my test, though. Even in IE.
Should be <br> of course.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #4

P: n/a
Thank you for your response, but this doesn't quite answer my question.

You'll have to forget that it's an address, and instead focus on that
fact that it's a series of P tags, where half need to be on one line,
and the other half on the next line. (And those two lines centered)

It is also quite important to conserve each item in their own P tags.
The system I am building requires that each item be in a P tag for
maximum flexibility. Absolutely NO formatting should be in the HTML.
All layout control is given to the CSS file.

Doing a "display: inline" combined with BR tags wherever needed works,
but my HTML file now contains explicit formatting (bad!). I should be
able to, for example, move the City to its own line without touching
the HTML file. Layout should be CSS only.

If anyone needs clarification, please let me know.

Thank you!

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/

Jul 21 '05 #5

P: n/a
me
<bu*****************@gradeastudent.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Thank you for your response, but this doesn't quite answer my question.

You'll have to forget that it's an address, and instead focus on that
fact that it's a series of P tags, where half need to be on one line,
and the other half on the next line. (And those two lines centered)

It is also quite important to conserve each item in their own P tags.
The system I am building requires that each item be in a P tag for
maximum flexibility. Absolutely NO formatting should be in the HTML.
All layout control is given to the CSS file.

Doing a "display: inline" combined with BR tags wherever needed works,
but my HTML file now contains explicit formatting (bad!). I should be
able to, for example, move the City to its own line without touching
the HTML file. Layout should be CSS only.

If anyone needs clarification, please let me know.

Thank you!

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/


See below:
Good Luck,
me

<style type="text/css">
<!--
..linebreak { position: relative; height: auto; clip: rect( )}
-->
</style>
stuff
<p class="linebreak">
stuff
Jul 21 '05 #6

P: n/a
bu*****************@gradeastudent.com wrote:
It is also quite important to conserve each item in their own P tags.
The system I am building requires that each item be in a P tag for
maximum flexibility. Absolutely NO formatting should be in the HTML.
All layout control is given to the CSS file.
<head>
<style type="text/css">
#header { text-align: center; margin-left: auto; margin-right: auto; }
#header p { margin: 0; }
..street { display: inline; }
..city { display: inline; }
..phone { display: inline; }
</style>
</head>
<body>

<div id="container">
<div id="main">
<div id="header">
<p class="street">123 Fake Street, </p>
<!-- <p></p> add empty p here to move city down -->
<p class="city">Crazy City, </p>
<p class="city">Ontario </p>
<p class="city">H0H 0H0</p>
<p></p>
<p class="phone">Telephone: 555-1234 </p>
<p class="phone">Fax: 555-4321</p>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

</body>
</html>
Doing a "display: inline" combined with BR tags wherever needed works,
but my HTML file now contains explicit formatting (bad!). I should be
able to, for example, move the City to its own line without touching
the HTML file. Layout should be CSS only.


...but without touching the HTML? I tried using "content before" to add
the empty p elements, but that won't work in IE. :-(

Is this output from a database or a feed of some kind? Page generated
by program? Is there a way that program could insert the empty p
element when necessary? Can you give a reason why the HTML can't be
touched .. I'm curious...

--
-bts
-This space intentionally left blank.
Jul 21 '05 #7

P: n/a
in comp.infosystems.www.authoring.stylesheets, Beauregard T. Shagnasty wrote:
How about this? It's an address, correct?


Yes. That's why he should not use address element.
http://www.w3.org/TR/REC-html40/stru...l.html#h-7.5.6

Yes, it is not very intuitive.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #8

P: n/a
in comp.infosystems.www.authoring.stylesheets, Mat wrote:
<div id="container">
<div id="main">
<div id="header">
<p class="Address">123 Fake Street, </p>
<p class="City">Crazy City, </p>
<p class="Province">Ontario </p>
<p class="PostalCode">H0H 0H0</p>
<p class="Telephone">Telephone: 555-1234 </p>
<p class="Fax">Fax: 555-4321</p>
</div>
</div>
Those are not paragraphs. Use div.
What I need to do is get the following result:

<!-- the following two lines should be centered -->
123 Fake Street, Crazy City, Ontario H0H 0H0
Telephone: 555-1234 Fax: 555-4321
<!-- the rest should be normal, or left-aligned -->


..Telephone:before {content:\a;}

Not much (if all) supported. Seems that browsers only support it for BR
element...

This works in Opera 6+, propably FF.

..Telephone:before {display:block;content:"";}

In IE6? You can do some guesswork.

But you are solving wrong problem...

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #9

P: n/a
bu*****************@gradeastudent.com wrote:
Thank you for your response, but this doesn't quite answer my question.

You'll have to forget that it's an address, and instead focus on that
fact that it's a series of P tags, where half need to be on one line,
and the other half on the next line. (And those two lines centered)

It is also quite important to conserve each item in their own P tags.
The system I am building requires that each item be in a P tag for
maximum flexibility. Absolutely NO formatting should be in the HTML.
All layout control is given to the CSS file.

Doing a "display: inline" combined with BR tags wherever needed works,
but my HTML file now contains explicit formatting (bad!). I should be
able to, for example, move the City to its own line without touching
the HTML file. Layout should be CSS only.

If anyone needs clarification, please let me know.

Thank you!

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/

Maybe you should consider an XML document with a XSLT sheet. Then you
can format your data extremely specifically and combine that with a
stylesheet.

I havent done this in years but it would go something like this:

XML:
<blurb>
<sender>
<name></name>
<adress>
<street>123 Fakestreet</street>
<city>Cazy City</city>
<province>Ontario</province>
<postalcode>HOH OHO</postalcode>
</adress>
<comms>
<home>555-1234</home>
<fax>555-4321</fax>
</comms>
</sender>
<contents>
<p>Hello whatever blah blah</p>
</contents>
</blurb>

XSLT :
<xsl:template match="/">
<html><head><title>Blurbs!</title></head><body>
<xsl:for-each select="blurb">
<div class="container">
<p class="name"><xsl:apply-templates select="name"/></p>
<div class="adress">
<p><xsl:apply-templates select="street"/>, <xsl:apply-templates
select="city"/>, <xsl:apply-templates select="province"/></p>
</div>
<div class="comms">
<xsl:for-each select="sender/comms"/>
<p><xsl:apply-templates/></p>
</xsl:for-each>
</div>
<div class="contents">
<xsl:apply-templates select="contents/*"/>
</div>
</div>
</xsl:for-each>
</body></html>
</xsl:template>
Jul 21 '05 #10

P: n/a
The HTML is actually not generated from a database, but it might as
well be. It's actually a PHP page, looks something like this:

<style type="text/css" media="all">
@import "/profiles/shared.css";
@import "/profiles/system/profile.css";
</style>

<div id="container">

<? $sBox = "centrePhoto" ?>
<div id="<?= $sBox ?>">
<p class="p1"><span><?= $oProfile->getOutput($sBox, "ImageID")
?></span></p>
<p class="h4"><span><?= $oProfile->getOutput($sBox, "SubCaption")
?></span></p>
</div>

</div>

Along with this, I have an XML file that defines my data structure, so
for example:

<ImageID input="image" type="int" length="11" />
<SubCaption input="text" type="varchar" length="255" size="30" />

So if I were to look at my PHP page in the browser, I would get each
item line after line - the simplest of outputs (but ugly to look at).

Then comes the CSS file. By using the magic of CSS, I can format
everything so I can have neat little boxes and pretty headers, bold,
italic, etc etc. If for some reason it ever needed to be re-skinned,
an alternate CSS file could be provided and voila, new look.

So basically, the whole thing is split into 3 parts: Data definitions,
HTML, and layout.

I hope that answers your question =)

As for my specific problem, so far the only solutions are adding an
extra empty P tag after EVERY SINGLE P tag:

<p class="Field">Something in here</p><p class="FieldFriend"></p>

Then I could choose to either cause a break with FieldFriend or leave
it null.

The other solution, of course, is to put a BR in the HTML =)

I was hoping for a solution that looked like this:

#header p.Field1 { display: inline; }
#header p.Field2 { display: inline; }
#header p.Field3 { display: inline; }
#header p.Field4 { display: inline; break-before: true; } /* I wish! */
#header p.Field5 { display: inline; }

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/

Beauregard T. Shagnasty wrote:
bu*****************@gradeastudent.com wrote:
It is also quite important to conserve each item in their own P tags. The system I am building requires that each item be in a P tag for
maximum flexibility. Absolutely NO formatting should be in the HTML. All layout control is given to the CSS file.
<head>
<style type="text/css">
#header { text-align: center; margin-left: auto; margin-right: auto;

} #header p { margin: 0; }
.street { display: inline; }
.city { display: inline; }
.phone { display: inline; }
</style>
</head>
<body>

<div id="container">
<div id="main">
<div id="header">
<p class="street">123 Fake Street, </p>
<!-- <p></p> add empty p here to move city down -->
<p class="city">Crazy City, </p>
<p class="city">Ontario </p>
<p class="city">H0H 0H0</p>
<p></p>
<p class="phone">Telephone: 555-1234 </p>
<p class="phone">Fax: 555-4321</p>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

</body>
</html>
Doing a "display: inline" combined with BR tags wherever needed works, but my HTML file now contains explicit formatting (bad!). I should be able to, for example, move the City to its own line without touching the HTML file. Layout should be CSS only.
..but without touching the HTML? I tried using "content before" to

add the empty p elements, but that won't work in IE. :-(

Is this output from a database or a feed of some kind? Page generated by program? Is there a way that program could insert the empty p
element when necessary? Can you give a reason why the HTML can't be
touched .. I'm curious...

--
-bts
-This space intentionally left blank.


Jul 21 '05 #11

P: n/a
Turns out there's such a thing as "page-break-before", but in my tests
it doesn't seem to work. Would have been perfect:

#header p.Field1 { display: inline; }
#header p.Field2 { display: inline; }
#header p.Field3 { display: inline; }
#header p.Field4 { display: inline; page-break-before: always; }
#header p.Field5 { display: inline; }

butch-google-gro...@gradeastudent.com wrote:
The HTML is actually not generated from a database, but it might as
well be. It's actually a PHP page, looks something like this:

<style type="text/css" media="all">
@import "/profiles/shared.css";
@import "/profiles/system/profile.css";
</style>

<div id="container">

<? $sBox = "centrePhoto" ?>
<div id="<?= $sBox ?>">
<p class="p1"><span><?= $oProfile->getOutput($sBox, "ImageID")
?></span></p>
<p class="h4"><span><?= $oProfile->getOutput($sBox, "SubCaption")
?></span></p>
</div>

</div>

Along with this, I have an XML file that defines my data structure, so for example:

<ImageID input="image" type="int" length="11" />
<SubCaption input="text" type="varchar" length="255" size="30" />

So if I were to look at my PHP page in the browser, I would get each
item line after line - the simplest of outputs (but ugly to look at).

Then comes the CSS file. By using the magic of CSS, I can format
everything so I can have neat little boxes and pretty headers, bold,
italic, etc etc. If for some reason it ever needed to be re-skinned,
an alternate CSS file could be provided and voila, new look.

So basically, the whole thing is split into 3 parts: Data definitions, HTML, and layout.

I hope that answers your question =)

As for my specific problem, so far the only solutions are adding an
extra empty P tag after EVERY SINGLE P tag:

<p class="Field">Something in here</p><p class="FieldFriend"></p>

Then I could choose to either cause a break with FieldFriend or leave
it null.

The other solution, of course, is to put a BR in the HTML =)

I was hoping for a solution that looked like this:

#header p.Field1 { display: inline; }
#header p.Field2 { display: inline; }
#header p.Field3 { display: inline; }
#header p.Field4 { display: inline; break-before: true; } /* I wish! */ #header p.Field5 { display: inline; }

Mathieu
ma*@rumblehousemedia.com
http://www.rumblehousemedia.com/

Beauregard T. Shagnasty wrote:
bu*****************@gradeastudent.com wrote:
It is also quite important to conserve each item in their own P tags. The system I am building requires that each item be in a P tag for maximum flexibility. Absolutely NO formatting should be in the HTML. All layout control is given to the CSS file.
<head>
<style type="text/css">
#header { text-align: center; margin-left: auto; margin-right: auto; }
#header p { margin: 0; }
.street { display: inline; }
.city { display: inline; }
.phone { display: inline; }
</style>
</head>
<body>

<div id="container">
<div id="main">
<div id="header">
<p class="street">123 Fake Street, </p>
<!-- <p></p> add empty p here to move city down -->
<p class="city">Crazy City, </p>
<p class="city">Ontario </p>
<p class="city">H0H 0H0</p>
<p></p>
<p class="phone">Telephone: 555-1234 </p>
<p class="phone">Fax: 555-4321</p>
</div>
<p class="Blurb">Hello whatever blah blah</p>
</div>
</div>

</body>
</html>
Doing a "display: inline" combined with BR tags wherever needed
works, but my HTML file now contains explicit formatting (bad!). I
should be able to, for example, move the City to its own line without touching the HTML file. Layout should be CSS only.
..but without touching the HTML? I tried using "content before" to

add
the empty p elements, but that won't work in IE. :-(

Is this output from a database or a feed of some kind? Page

generated
by program? Is there a way that program could insert the empty p
element when necessary? Can you give a reason why the HTML can't be
touched .. I'm curious...

--
-bts
-This space intentionally left blank.


Jul 21 '05 #12

P: n/a
bu*****************@gradeastudent.com wrote:
Turns out there's such a thing as "page-break-before", but in my tests
it doesn't seem to work. Would have been perfect:


It does work in several browsers. But I thought you wanted a line
break in the screen presentation, not a page break in the print
presentation?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #13

P: n/a
in comp.infosystems.www.authoring.stylesheets, butch-google-
gr****@gradeastudent.com wrote:
Turns out there's such a thing as "page-break-before",
Yes.
but in my tests it doesn't seem to work.
You are trying in continous media. If you don't know what it is, read
http://www.w3.org/TR/CSS21/
Would have been perfect:

#header p.Field1 { display: inline; }
#header p.Field2 { display: inline; }
#header p.Field3 { display: inline; }
#header p.Field4 { display: inline; page-break-before: always; }
#header p.Field5 { display: inline; }


This will print the stuff after field3 to different *page*

TOFU snipped, learn to post, plonk.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #14

P: n/a
in comp.infosystems.www.authoring.stylesheets, Beauregard T. Shagnasty
..but without touching the HTML? I tried using "content before" to add
the empty p elements, but that won't work in IE. :-(


You can't add elements using CSS21, and empty paragraphs should be
ignored anyway.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #15

P: n/a
me
<bu*****************@gradeastudent.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Turns out there's such a thing as "page-break-before", but in my tests
it doesn't seem to work. Would have been perfect:

#header p.Field1 { display: inline; }
#header p.Field2 { display: inline; }
#header p.Field3 { display: inline; }
#header p.Field4 { display: inline; page-break-before: always; }
#header p.Field5 { display: inline; }


Page break? Where the hell did that come from? Son if you're going to ask
questions give us a fighting chance and be clear about what you want to
accomplish, OK. Thank you.
Signed,
me
Jul 21 '05 #16

P: n/a
My bad, not a page-break. Got a little too tied up in the word "break"
=)

I appreciate the responses so far, and I apologize for posting about a
page-break instead of a line-break.

I will try to "re-phrase" and simplify the problem to avoid people
going on tangents:

-Assume you must have several P tags containing paragraphs one after
the other

<div id="container">
<p class="tag1">Text1</p>
<p class="tag2">Text2</p>
<p class="tag3">Text3</p>
</div>

-The challenge is to put Text1 and Text2 next to each other, and to
have Text3 on the next line, using CSS only, and without using float.
That's it, that's all. If you can do this, please let me know how =)

Jul 21 '05 #17

P: n/a
bu*****************@gradeastudent.com wrote:
-Assume you must have several P tags containing paragraphs one after
the other

<div id="container">
<p class="tag1">Text1</p>
<p class="tag2">Text2</p>
<p class="tag3">Text3</p>
</div>

-The challenge is to put Text1 and Text2 next to each other, and to
have Text3 on the next line, using CSS only, and without using float.


That's easy.

..tag1, .tag2 {display: inline;}
..tag3 {display: block; margin-top: 0;}
(the display: block; is the default but is included here for clarity)

It's your fourth "paragraph" that causes the problem.

But ISTM that the text in your original example is not a series of
paragraphs and hence should not be marked up with a series of <p>
elements.

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #18

P: n/a
Ah you are right, my example is STILL not accurate, and it is indeed
the 4th paragraph that causes the problem.

It should have read:

<div id="container">
<p class="tag1">Text1</p>
<p class="tag2">Text2</p>
<p class="tag3">Text3</p>
<p class="tag4">Text4</p>
</div>

-Put Text1 and Text2 next to each other, and on a new line, Text3 and
Text4 next to each other, using only CSS, without using float.
And you'll have to look past the fact that I'm using P tags. I
understand that they should not be used etc etc. I suppose they should
be replaced with DIV tags, as that is what they really are (ie.
divisions of text).

So is the conclusion that what I'm trying to accomplish is currently
impossible in the current state of CSS?

Jul 21 '05 #19

P: n/a
bu*****************@gradeastudent.com wrote:
Ah you are right, my example is STILL not accurate, and it is indeed
the 4th paragraph that causes the problem.

It should have read:

<div id="container">
<p class="tag1">Text1</p>
<p class="tag2">Text2</p>
<p class="tag3">Text3</p>
<p class="tag4">Text4</p>
</div>

-Put Text1 and Text2 next to each other, and on a new line, Text3 and
Text4 next to each other, using only CSS, without using float.
Floats are the only way to do it if you refuse to modify your HTML.
And you'll have to look past the fact that I'm using P tags. I
understand that they should not be used etc etc. I suppose they should
be replaced with DIV tags, as that is what they really are (ie.
divisions of text).
Or spans. Replace the <p>s with <span>s and stick a <br> in there and
you're sorted.
So is the conclusion that what I'm trying to accomplish is currently
impossible in the current state of CSS?


You want the text centered on each line?

The following works so long as (a) text1 and text2 are roughly the
same length, and likewise text3 and text4 are roughly the same length;
and (b) nothing wraps onto another line.

..tag1 {width: 50%; float: left; text-align: right;}
..tag2 {width: 50%; float: right; text-align: left;}
..tag3 {clear: both; width: 50%; float: left; text-align: right;}
..tag4 {width: 50%; float: right; text-align: left;}

(IE bugs might mean that you need to make the widths 49% instead.)

But it's very artificial and fragile and it would be much more logical
to just stick a <br> into the HTML.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #20

P: n/a
Thank you very much for your time

BR it is... =(

Jul 21 '05 #21

P: n/a
in comp.infosystems.www.authoring.stylesheets, Steve Pugh wrote:
bu*****************@gradeastudent.com wrote:
-Put Text1 and Text2 next to each other, and on a new line, Text3 and
Text4 next to each other, using only CSS, without using float.


Floats are the only way to do it if you refuse to modify your HTML.


Or either of methods I used on other post, but they don't work on IE.
So is the conclusion that what I'm trying to accomplish is currently
impossible in the current state of CSS?


Not with current state of CSS, but current browser support.
But it's very artificial and fragile and it would be much more logical
to just stick a <br> into the HTML.


Best option would be to have 2 divs, for address and phone/fax numbers.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #22

P: n/a
bu*****************@gradeastudent.com wrote:
Thank you very much for your time

BR it is... =(

See my post further down about using XSLT directly on your XML data. It
will satisfy all your formatting needs, but you will need to learn basic
XSLT.
Jul 21 '05 #23

P: n/a
I don't doubt that it would work quite well, unfortunately I am not in
the beginning phases of this project. The technique I have been using
with CSS has satisfied every single formatting need except for that
single problem.

I am thankful for your response, and will look into XSLT for the sake
of curiosity.

Thanks again,
Mathieu

Ståle Sæbøe wrote:
bu*****************@gradeastudent.com wrote:
Thank you very much for your time

BR it is... =(
See my post further down about using XSLT directly on your XML data.

It will satisfy all your formatting needs, but you will need to learn basic XSLT.


Jul 21 '05 #24

This discussion thread is closed

Replies have been disabled for this discussion.