I want to use CSS to position some form elements (search box and Search button) relative to the right hand side of the screen, but cannot see how to do it.
I am using dreamweaver to create the CSS styles, but can only see ways of positioning from the left.
Can I do this or should I be using nested tables?
also, how can I stop the button and input field wrapping when the screen size is reduced?
ThanksYou could try something like this:
<div style="width: 215px; float: right;">
<form action="someaction.php">
<p><input type="text" name="search"> <input type="submit" name="search" value="Search"></p>
</form>
</div>That must be the fastest reply I have ever had in these forums.
Thanks for the code, it was the "float" bit I was unaware of. Dreamweaver doesnt make it very clear, I really ought to read up on editing CSS separately from dreamweaver.
Many ThanksYes, DW is a great tool, but no WYSIWYG comes close to what you can do if you can hard code. For more info on CSS take a look at <!-- m --><a class="postlink" href="http://www.w3schools.com/css">http://www.w3schools.com/css</a><!-- m --> and the specs: <!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/Thanks">http://www.w3.org/TR/CSS2/Thanks</a><!-- m --> for the links, I was about to post some more questions, but a quick read through those sites has already answered a couple of them.
TaYou bet. Glad you found them helpful...
I am using dreamweaver to create the CSS styles, but can only see ways of positioning from the left.
Can I do this or should I be using nested tables?
also, how can I stop the button and input field wrapping when the screen size is reduced?
ThanksYou could try something like this:
<div style="width: 215px; float: right;">
<form action="someaction.php">
<p><input type="text" name="search"> <input type="submit" name="search" value="Search"></p>
</form>
</div>That must be the fastest reply I have ever had in these forums.
Thanks for the code, it was the "float" bit I was unaware of. Dreamweaver doesnt make it very clear, I really ought to read up on editing CSS separately from dreamweaver.
Many ThanksYes, DW is a great tool, but no WYSIWYG comes close to what you can do if you can hard code. For more info on CSS take a look at <!-- m --><a class="postlink" href="http://www.w3schools.com/css">http://www.w3schools.com/css</a><!-- m --> and the specs: <!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/Thanks">http://www.w3.org/TR/CSS2/Thanks</a><!-- m --> for the links, I was about to post some more questions, but a quick read through those sites has already answered a couple of them.
TaYou bet. Glad you found them helpful...