Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Basic CSS Content Placement Question

Reply
Thread Tools

Basic CSS Content Placement Question

 
 
Rangy
Guest
Posts: n/a
 
      03-08-2007
Hi,

Say you have a simple layout as follows (all DIVs):

Header
Content Column
Footer

What is the best way to align and position the content WITHIN the
"Column" div? In the past I would have used nested tables but I'm not
sure of how "the pros" out there do it.

I saw some suggestions about creating a child element (e.g. <p>) and
then using absolute positioning with a parent (h1) element that is set
for relative positioning.

Any advice is greatly appreciated. There must be a better way than
<br>!

Thanks!
Rangy

 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      03-08-2007

Rangy wote:
> Hi,
>
> Say you have a simple layout as follows (all DIVs):
>
> Header
> Content Column
> Footer
>
> What is the best way to align and position the content WITHIN the
> "Column" div? In the past I would have used nested tables but I'm not
> sure of how "the pros" out there do it.
>
> I saw some suggestions about creating a child element (e.g. <p>) and
> then using absolute positioning with a parent (h1) element that is set
> for relative positioning.
>
> Any advice is greatly appreciated. There must be a better way than
> <br>!
>
> Thanks!
> Rangy


I don't have my crystal ball with me today, but I'll bet that Column
is for navigation, isn't it? How about
<ul id="nav">
<li><a href="somewhere.html"></li>
<li><a href="thispage.html" id="thispage"></li>
</ul>

Depending on how you are generating the page (by hand static) or
server side, you can use the id="thispage" to make that link different
from the others so people will know that they are on that page.

--
Adrienne Boswell at work
Administrator nextBlock.com
http://atlas.nextblock.com/files/
Please respond to the group so others can share

 
Reply With Quote
 
 
 
 
Bergamot
Guest
Posts: n/a
 
      03-08-2007
Rangy wrote:
>
> I saw some suggestions about creating a child element (e.g. <p>) and
> then using absolute positioning with a parent (h1) element that is set
> for relative positioning.


Unless you know what you are doing, you should avoid absolute
positioning. The inexperienced often end up with broken design.

What to do instead is dependent on the particular content and what you
are really trying to achieve. There is no one best way.

BTW, nesting <p> inside <h1> is invalid. And relative positioning
probably isn't what you think it is. Read the specs at
http://www.w3.org/TR/CSS21/visuren.html

--
Berg
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Re: correction: A question about css (was: A question about css) richard HTML 12 03-09-2010 08:52 PM
VHDL language question regarding placement of attributes KJ VHDL 2 09-22-2006 09:07 PM
dynamic data grid placement question =?Utf-8?B?UGF1bA==?= ASP .Net 6 10-21-2004 06:15 PM
Placement operator new/delete question Ioannis Vranos C++ 11 10-16-2004 04:18 AM



Advertisments