473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Answering position:absolute query once and for all

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:

<HTML>
<HEAD>

<STYLE>
<!--
..TheWrapper {POSITION:absolute; FONT-SIZE:12px;}
..TheTextBox {WIDTH:200px;}
..TheText {POSITION:absolute; LEFT:30px; TOP:5px;}
//-->
</STYLE>

</HEAD>
<BODY>
<BR><BR><BR><BR><BR><BR><BR><BR><BR>
<DIV CLASS="TheWrapper">
<INPUT TYPE="BUTTON" CLASS="TheTextBox">

<DIV CLASS="TheText">fred</DIV>
</DIV>

</BODY>
</HTML>

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
Jan 17 '06 #1
2 1858
Laphan wrote:

[Found also multi-posted to alt.www.webmaster. Please don't do that.]
http://oakroadsystems.com/genl/unice.htm#xpost
(you can still see an example at www.frozenmoles.co.uk ), however this caused
in even more chaos
Yes. Have you looked at it in a browser with JavaScript disabled?

[most code snipped] <BODY>
<BR><BR><BR><BR><BR><BR><BR><BR><BR>
What are all of those BRs for?
Is this a fluke or is this actually the way that you would do it?


I would not do it that way.

--
-bts
-Warning: I brake for lawn deer
Jan 17 '06 #2
Hi

Many thanks for the prompt reply.

1) Yes. My frozenmoles site needs a damn good update. Work in Progress.

2) I just put the <BR>s in to quickly bring the INPUT down the page. It was
a test after all :0)

3) How would you do it?

Rgds Laphan
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:nv****************************@40tude.net...
Laphan wrote:

[Found also multi-posted to alt.www.webmaster. Please don't do that.]
http://oakroadsystems.com/genl/unice.htm#xpost
(you can still see an example at www.frozenmoles.co.uk ), however this
caused
in even more chaos
Yes. Have you looked at it in a browser with JavaScript disabled?

[most code snipped] <BODY>
<BR><BR><BR><BR><BR><BR><BR><BR><BR>
What are all of those BRs for?
Is this a fluke or is this actually the way that you would do it?


I would not do it that way.

--
-bts
-Warning: I brake for lawn deer
Jan 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Harald Kirsch | last post by:
In the W3C document about CSS2, I read at http://www.w3.org/TR/REC-CSS2/visuren.html#choose-position the following: absolute The box's position (and possibly size) is specified with the...
4
by: Peter Pfannenschmid | last post by:
Hello experts, I would be very grateful if you would have a look at the following URL: http://www.omeganet.de/test.html The html file and the associated style have been validated...
2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
6
by: ThunderMusic | last post by:
Hi, I think the subject says it all... thanks ThunderMusic
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.