Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

CSS Coordinates

Author Message
joephish



Joined: 27 Mar 2005
Posts: 17
Location: Scotland

Posted: Thu Aug 26, 2004 - 1:52 pm    Post subject: Imported from The Dashboader Reply with quote

Gadget creation is the first time I've properly experimented with CSS and JavaScript. So sorry if this is a stupid question.

I don't quite understand with this kind of thing in a class:

position: absolute;
top: 28px;
left: 45px;

I'm assuming these coordinates are from the top left hand corner of the gadget to the top left hand corner of the text. Also, I have "margin: 0;" for body if that makes any difference.

It doesn't seem to position my text at those coordinates at all, but around +/-4 or 8 off horizontally vertically. How can I work out how to position the text precisely?
View user's profile Send private message Visit poster's website Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Thu Aug 26, 2004 - 1:52 pm    Post subject: Imported from The Dashboader Reply with quote

Presumably you have the text in a div or span. That element (that's containing the text) will have padding/margins associated with it. Play around with that and see what happens. Of course - just put border: 1px solid black; in the style for the element to see where exactly you are positioning it. The border will shift the text 1px down/right (obviously), but you'll get the idea.

Anyway - that's why the text isn't exactly where you want - just change the coordinates though till it's right (that's what I do Wink)
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
joephish



Joined: 27 Mar 2005
Posts: 17
Location: Scotland

Posted: Thu Aug 26, 2004 - 1:52 pm    Post subject: Imported from The Dashboader Reply with quote

Aaah that makes sense - thanks!

"just change the coordinates though till it's right (that's what I do Wink)"

Ick ick ick nooo! Nasty Razz
View user's profile Send private message Visit poster's website Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group