Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Absolute positioning in a <div>?
 

Gustaf Liljegren




quote this post edit post

IP Loged report this post

Old Post  08-21-04 - 09:34 AM  
Here's what I'm trying to achieve:

1. A <div>, centered on screen, 600px wide and 100px high, with a
background-image (also 600 x 100).
2. Text (an <h1> element) positioned with precision inside the <div>, on
the image.
3. A similar result in IE and FF...

Here's some of the XHTML:

<body>
<div id="container">
<div id="top">
<h1>Title</h1>
</div>
..
</div>
</body>

Here are selected parts of my CSS:

body {
text-align: center;
..
}

#container {
width: 600px;
..
margin-right: auto;
margin-left: auto;
..
padding: 0px;
}

#top {
width: 600px;
height: 100px;
background-image: url('banner.png');
..
padding: 0px;
}

#top h1 {
..
}

I can't figure out how to position the text in '#top h1'. I want it,
say, 30px from the top of #top and 20px from the left border of #top. So
it seems I need to use absolute positioning, but only inside the #top
<div>. Hope it's possible...

Gustaf


Post Follow-Up to this message ]
Re: Absolute positioning in a <div>?
 

Gustaf Liljegren




quote this post edit post

IP Loged report this post

Old Post  08-21-04 - 09:34 AM  
Alan J. Flavell wrote:
 

> You really have to make up your mind whether your targets are people
> (good) or computers (ungood).

I'm pretty sure that if someone would watch my site on a screen less
than 640 x 480, they'll have a way better experience than on the average
site out there. If my default style doesn't suit my users, the pages are
completely readable and well structured without it.

> You proved my point, it seems.  You're still showing lack of
> understanding that flexible design is for people - you seem to think
> it's only for dealing with buggy browsers.

I hoped mentioning Web Accessibility would prove my concern for this.
I'm just not prepared to go through any lengths only to make the site
accessible to the last 0.5 perecent.

> I've no objection to you making your web page look the way you wanted
> it to look, in the narrow range of display situations which you
> consider to be the majority.

It's not about what I consider, but about the statistics. Have a look:

http://www.w3schools.com/browsers/browsers_stats.asp

My guess is that the figures shown here are even more heterogeneous than
average (because it's a technical site, and advanced users are more
likely to use something other than IE5 at 800 x 600). But the lession I
learn from this is that the world is not so diverse at all, and it makes
perfect sense to do what works for the great majority.

Gustaf


Post Follow-Up to this message ]
Re: Absolute positioning in a <div>?
 

Brian




quote this post edit post

IP Loged report this post

Old Post  08-23-04 - 12:17 AM  
Gustaf Liljegren wrote:

> Spartanicus wrote:
> 
>
> Because [...] it's recommended by the W3C.

HTML is also recommended by the W3C:

<quote source: http://www.w3.org/TR/html4/ >
HTML 4.01 Specification
W3C *Recommendation* 24 December 1999
</quote>

[emphasis is mine]

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 03:36 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top