FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

[CSS] form design

 


jasperlevink
Hello folks!

Why doesn't this work in firefox? (it does in IE)
Code:
<div><span style="width: 130px;"  class="text">Naam: </span><span><input name="naam" style="width:200px"></span></div>


The inputbox is meant to be placed at 130 px.

Another small question:
Is it possible to give an absolute placement of a span within a div?
So for example exactly at 130 px from the left of a div?

When you say:

Code:
<div><span style="position: 130px;">text</span></div>


It places the span at 130px from the left of the page.


Thanks.
Jasper
misterdimiz
Use this code:

Code:
<div>
<div style="float: left; width: 130px;">
<span class="text">Naam: </span></div>
<div style="float: left; width: 200px;">
<input name="naam" style="width: 200px;"></div>
</div>


Wink
Grimboy
The lesson here is that only box level elements can have a width attribute. (Either that or I'm some how in the dark.)
dandelion
Grimboy wrote:
The lesson here is that only box level elements can have a width attribute. (Either that or I'm some how in the dark.)

Also you can set the display an inline element property value to 'block'.
Code:
<span style="display: block; width: 130px;">Blah blah blah</span>
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.