Click to See Complete Forum and Search --> : Positioning elements on the right of the page
Grunty
08-18-2003, 08:15 AM
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?
Thanks
You 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>
Grunty
08-18-2003, 08:24 AM
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 Thanks
Yes, 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 http://www.w3schools.com/css and the specs: http://www.w3.org/TR/CSS2/
Grunty
08-18-2003, 08:40 AM
Thanks 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.
Ta
You bet. Glad you found them helpful... :)