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

Embedded <Div>?

P: n/a
given:

<div id="header">
<div id="tdate">
<div id="photo">
</div>
</div>
</div>

The two embedded divs insist on arranging themselves one on top of the
other. "Tdate" has its width property set to 25%. "Header" div has its
valign property set to top.

What must I do to make it so the "tdate" is left justified within "header"
and "photo" is right justified?

Additionally, I would like it, if the user increases the width of the page,
that the "photo" div remains a static width and the "tdate" div adjusts
itself accordingly.

Thanks.


Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Karl" <kt*******@pine-grove.com.nospam> wrote:
<div id="header">
<div id="tdate">
<div id="photo">
</div>
</div>
</div>

The two embedded divs insist on arranging themselves one on top of the
other.
They shouldn't as you've placed "photo" inside "tdate".
"photo" should appear inside "tdate" not below it.

Post a URL without being able to see all the real code, and where the
actual content goes it's hard to visualise what you want.
"Tdate" has its width property set to 25%. "Header" div has its
valign property set to top.
There is no valign property. The HTML valign attribute only applies to
table cells and the CSS vertical-align property only applies to inline
and table-cell elements, i.e. not to block level elements like div.
What must I do to make it so the "tdate" is left justified within "header"
and "photo" is right justified?
float: left; and float: right;
Additionally, I would like it, if the user increases the width of the page,
that the "photo" div remains a static width and the "tdate" div adjusts
itself accordingly.


tdate will always be 25% of the width of header. Does that count as
adjusting itself accordingly? If you want a static width on photo then
just set the width property in pixels.

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 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.