FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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>
Related topics
Do you use css to design a website?
for your comments
How to center something horizontally AND vertically...
PHP Question
Ecommerce site building and tips
Dreamweaver or Golive?
CSS Help needed : Table emulation with divs
Table Cell Widths in HTML
I got one of those Webpage Design programs....
CSS/HTML
Xcomic
How to email data...
Make my website beautiful and fast: HOW?
CSS And Tables: The Hype And The Trends
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

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