How to put elements next to each other horizontally

How to put elements next to each other horizontally

am 26.11.2007 05:01:45 von cristian

I have this div for the top of my page. Nested into it, I have a
heading and another div. How can I make that heading and div stand
next to each other horizontally?
I have tried turning them into inline elements, but always one appear
in the top and the other in the bottom of it. I have used floats,
unsuccessfully.
The home page of Inkscape - http://inkscape.org/ - sets a heading
next to a div just the way I want it. I have looked into their CSS
file and tried to do the same, however, I think my knowledge is too
limited at this moment. Could anyone explain me how to do that?
Not sure if it works, but I have this example of the HTML I am using.




Heading






Re: How to put elements next to each other horizontally

am 26.11.2007 05:26:31 von dorayme

In article
m>,
Cristian wrote:

> I have this div for the top of my page. Nested into it, I have a
> heading and another div. How can I make that heading and div stand
> next to each other horizontally?
> I have tried turning them into inline elements, but always one appear
> in the top and the other in the bottom of it. I have used floats,
> unsuccessfully.
> The home page of Inkscape - http://inkscape.org/ - sets a heading
> next to a div just the way I want it. I have looked into their CSS
> file and tried to do the same, however, I think my knowledge is too
> limited at this moment. Could anyone explain me how to do that?
> Not sure if it works, but I have this example of the HTML I am using.
>
>
>


>
>

Heading


>
>
>
>

>

Is this the sort of effect you want:

"http://www.w3.org/TR/html4/strict.dtd">


Title



Heading


Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Pellentesque augue.Suspendisse consectetuer velit nec neque. Duis
nec orci quis nulla egestas fermentum.Ut quis eros. Aenean at
augue vitae quam posuere vehicula. Pellentesque habitantmorbi
tristique senectus et netus et malesuada fames ac turpis egestas.
Maecenas justonunc, porta sed, molestie eget, adipiscing id,
ante. Cum sociis natoque penatibus etmagnis dis parturient
montes, nascetur ridiculus mus. Suspendisse potenti. Nunc
blanditmagna id odio sodales luctus. Nulla quam magna, viverra
quis, dignissim blandit, viverra nec, odio.





?

There are some nice issues here.

--
dorayme

Re: How to put elements next to each other horizontally

am 26.11.2007 22:24:51 von Kailash Nadh

On Nov 26, 4:01 am, Cristian wrote:
> I have this div for the top of my page. Nested into it, I have a
> heading and another div. How can I make that heading and div stand
> next to each other horizontally?
> I have tried turning them into inline elements, but always one appear
> in the top and the other in the bottom of it. I have used floats,
> unsuccessfully.
> The home page of Inkscape -http://inkscape.org/- sets a heading
> next to a div just the way I want it. I have looked into their CSS
> file and tried to do the same, however, I think my knowledge is too
> limited at this moment. Could anyone explain me how to do that?
> Not sure if it works, but I have this example of the HTML I am using.
>
>
>


>
>

Heading


>
>
>
>

>

Give the h1 and #right widths and try floating them (if you fail to
give proper widths, the elements won't float). Example css.

Re: How to put elements next to each other horizontally

am 26.11.2007 23:38:07 von rf

"kailash nadh" wrote in message
news:99f3637a-c5c7-49a6-96dd-6a86b489e6a6@s6g2000prc.googleg roups.com...
> On Nov 26, 4:01 am, Cristian wrote:

> Give the h1 and #right widths and try floating them (if you fail to
> give proper widths, the elements won't float).

Nope. They will float. If you fail to give them width the the width defaults
to auto and the used value is the "shrink-to-fit" width.

--
Richard.