Click here to get back home

Answering position:absolute query once and for all

 HomeNewsGroups | Search

alt.www.webmaster - All aspects of webmastering business 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Answering position:absolute query once and for all Laphan 01-17-2006
Posted by Laphan on January 17, 2006, 7:21 pm
Please log in for more thread options


Hi All

I have developed a site whereby it uses the contents of a folder (incs gifs,
jpgs and css files) to display the web 'skin' of the site. This is OK, but
each button on the site is an individual pic (I didn't want to use diff
colour INPUT boxes because I wanted to display graphical buttons, rounded
edges, etc - can you do this !?!?!) and now that I've done quite a few skins
when I update the site having to update all of the skins to accommodate
button changes is becoming a bit of a pain.

Now not too long ago I experimented with using a blank graphical button and
then using position:absolute to position text over the top of the buttons
(you can still see an example at www.frozenmoles.co.uk), however this caused
in even more chaos as I seemed to have to position everything from the very
top left of the page so if I changed the actual body content of my pages I
had spend hours fiddling with the pixel co-ords (top: and left:) to get my
footer text to line-up over my footer buttons. This seemed to be different
for every browser as well so I gave up!!

Then it dawned on me. Is it possible to put the buttons in some kind of
wrapper so that I only have to mess about with co-ords in a confined space,
ie the space within the wrapper, which is basically the buttons and the
text.

I just done a test page on IE 6, IE 5 and Firefox 1 (all on Windows) and it
seems to work. My test code is as follows:

show/hide quoted text

show/hide quoted text
<!--
.TheWrapper {POSITION:absolute; FONT-SIZE:12px;}
.TheTextBox
.TheText {POSITION:absolute; LEFT:30px; TOP:5px;}
show/hide quoted text

show/hide quoted text

show/hide quoted text

show/hide quoted text

Is this a fluke or is this actually the way that you would do it?

Has anybody gone down this route before and met many pitfalls?

Rgds Laphan




Similar ThreadsPosted
overflow:hidden; and position: absolute; in Opera February 2, 2006, 6:33 am
absolute and relative positions July 29, 2007, 8:14 am
CSS Absolute Positioning differs greatly in Opera May 19, 2006, 2:50 pm
text position problem March 31, 2006, 6:49 am
Permanent Web Developer Position Available May 4, 2006, 11:40 am
Automatic cursor position March 19, 2009, 5:47 am
how to position layout? CSS2 or table? October 16, 2005, 5:52 am
Google indexed site in the last position? July 6, 2006, 3:21 pm
position div top right regardless of vertical length of page? February 28, 2007, 8:07 am
Creating left and right absolute columns and two center fluid colums in CSS September 1, 2005, 2:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy