CSS - Need Some Ideas For A Form Layout
I need some people to bounce ideas off of. I am having a real hard time coming up with a layout that is accessible and fits my layout.
The form is very simple with two radio buttons and a text field. What I want is for the two radio buttons to display as a block but fit in a tight spot and the text field to float to the right and center if the two radio buttons. Here is a quick photochop of what I am going for. gary.webb.waptug.org/projects/epls/ Here is a link to the code I am building. gary.webb.waptug.org/projects/epls/images/search.gif Notice in the image that I have modified the banner a bit to fit the search form into the bottom dark blue bar. Thanks in advance. Similar TutorialsHello, I've been teaching myself css code for the past four days, and I almost have my website exactly the way I want it to look except for one thing. I have a three column layout and my right column always jumps under everything when the browser is re-sized. It only seems to work how I want it to in Safari. I've tried a ton of different things, and nothing seems to work, but I am a real novice. If you could help, I'd really appreciate it. Here is my css code: body { background-image: ( address blocked: See forum rules); margin: 0px; padding-left: 8%; padding-right: 8%; padding-top: 10px; background-attachment: scroll; min-width: 1000px; } #header { background: #00ff00; background-image: (address blocked: See forum rules); width: 100%; height: 125px; background-repeat: no-repeat; margin-bottom: 5px; border-style: ridge; border-color: black; min-width: 1050px; } #leftcol { background-image: ( address blocked: See forum rules); float: left; width: 14%; height: 722px; border-style: ridge; border-color: black; min-width: 145px; } #rightcol { background-image: ( address blocked: See forum rules); width: 12.5%; height: 722px; border-style: ridge; border-color: black; min-width: 142px; overflow: hidden; position: inherit; } #content { background: #fff; float: left; width: 70%; height: 722px; border-style: ridge; border-color: black; margin-left: 5px; margin-right: 5px; margin-bottom: 5px; min-width: 735px; } #footer { background: #660066; clear: none; width: 1050px; height: auto; border-style: ridge; border-color: black; margin-top: 5px; position: absolute; } Fixed. I'm having trouble positioning my form elements how I want them. The following code shows correctly in Mozilla but in IE, there are spaces around the form elements. How can I get rid of all the spacing? PHP Code: <form> <div style="border:1px solid;width:200px;height:20px;"></div> <div style="float:left;border:1px solid;width:100px;height:20px;"></div> <div><input style="border:1px solid;width:100px;height:20px;" /></div> <div style="float:left;border:1px solid;width:100px;height:20px;"></div> <div><input style="border:1px solid;width:100px;height:20px;" /></div> <input type="submit" style="font-size:12px;border:1px solid;width:200px;height:20px;" /> </form> Take a look at this comparision image: Thank you! By the way, I've also tried using a table and was still unable to get rid of all the spacing. I need css relative positioning for a web form interface on a browser page, so it is located (Center/middle) despite browser size. Then I need each of the elements inside of the form table absolutely positioned in relation to the box. The are eight graphics that surround the table. I would actually like to get rid of the table completely if it was possible. I believe the is a cleaner and more efficient way of doing this in css, but I haven't got a clue as to where to start? I have just read that I can apply the styles to this page in the header instead of being pulled from a universal style sheet, I would like to do this as this is a login page and is page is unique from the rest of the site. Any and all help greatly appreciated. Hello, I have been working for a few days on this form layout and it works pretty much the way I want it to in FF but everything goes to hell when I open it in IE. If you look at the code the three <td class="td_spacer"> elements are floated to the right but I dont know why the in IE they extend vertically off the page instead of reaching the predefined width of the form, where they should then be forced down to the row below. I hope someone can help me make sense of this. Code: form{ display:block; width:566px; margin:0px; padding:0px; } #form_table{ border-style:solid; border-color:black; border-width:thin; border-spacing:0px; border-collapse: collapse; float:right; width:564px; margin:0px 0px 50px 0px; padding:0px; } #form_table thead tr{ color:white; text-align:left; background-color:#1B1B1B; border:solid black thin; } #form_table tbody tr td{ float:right; display:block; } #country_list{ list-style-type:none; margin:0px; padding:5px 0px 0px 0px; } .td_spacer{ display:block; margin:0px; padding:10px 0px 0px 0px; } .input{ width:300px; } #message_box{ width:558px; height:286px; } Code: <form name="jobs" action="php/rtProcessor.php" method="post"> <table id="form_table" summary="post form"> <thead> <tr> <th><span class="">Post</span></th> </tr> </thead> <tbody> <tr> <td style="float:left;"> <ul id="country_list"> <li id="china"><input type="radio" name="color" value="red" />red</li> <li id="japan"><input type="radio" name="color" value="green" />green</li> <li id="korea"><input type="radio" name="color" value="blue" />blue</li> <li id="thailand"><input type="radio" name="color" value="orange" />orange</li> <li id="other"><input type="radio" name="color" value="Other" />Other</li> </ul> </td> <td class="td_spacer"> <label for="companyname">Company Name:</label> <input type="text" id="companyname" name="companyname" class="input" /> </td> <td class="td_spacer"> <label for="email">E-Mail Address:</label> <input type="text" id="email" name="email" class="input" /> </td> <td class="td_spacer"> <label for="subject">Subject:</label> <input type="text" id="subject" name="subject" class="input" /> </td> </tr> <tr> <td> <label for="message">Listing:</label> <textarea id="message_box" name="message" rows="16" cols="67"></textarea> </td> </tr> <tr> <td> <label for="hii">1+1 is?</label> <input type="text" id="hii" name="hii" class="input" /> </td> </tr> <tr> <td> <input type="submit" value="Submit" name="submit" /> </td> </tr> </tbody> </table> </form> Hello, I've got a problem which kind of puzzles me. I've made a website build up trough <DIV> tags and CSS. Now all went well till I wanted to insert a <FORM> tag. The moment I inserted that my wholy CSS goes haywire. Here is an example: http://ni.guildscentral.net/without_form.html http://ni.guildscentral.net/with_form.html Now the only difference between those two pages is the following: Code: <!-- Styles start --> <form method="POST" action=""> <div id="styles"> <select size="1" name="style"> <option value="1">Hunter 1</option> <option value="2">Hunter 2</option> <option value="3">Mage</option> <option value="4">Fight</option> <option value="5">Illidan</option> <option value="6">Arthas</option> <option value="7">Lich King</option> <option value="8">Soldier</option> <option value="9">Oversight</option> <option value="10">Infernal</option> </select><input type="submit" value=">" name="Go" width="8px"> </div> </form> <!-- Styles end --> Now I haven't got a clue why all my frames move to the left the moment I put that FORM tag in. Do you have any ideas/suggestions ? I have implemented a CSS dropdown menu and in FF3.05 on my PC if there are links in the top part of the content area Im unable to click on them. This is not a problem in IE for once it is just strange behaviour in FF. Check out the site and issue he http://dewinter.com.au/plans/index.php There are 3 links in the top of the content that Im unable to access, Contact and Single and Double plans.. Any ideas would be great. Hi i have a content div inside a container div, the content in the content div stretches automatically but the container div doesnt stretch to accomodate the bigger content div....is it possible to get it to stretch the same as the content? the only solution ifound was to fix the height and set the overflow to auto so that i get a scroll bar but that looks rubbish ;o( cheers Andy Hi guys, I am building a feature block that has a semi-transparent blue strip at the top with white text inside. I'm using all the various opacity filters (filter:alpha(opacity=70);-moz-opacity:0.7;opacity: 0.7;-khtml-opacity: 0.7 to set the blue strip to opacity of 70% (0.7) and positioning the text over the top of the blue strip so that it doesn't inherit the opacity. This works fab for everything....except the most recent version of Safari (1.2) which excepts the css3 opacity declaration. For some reason, the moment I set the text div (.vertical) to have a position value of absolute..or relative, it inherits the opacity value for the div above it, even though it is not a child. Here's the code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css" media="screen"> a { color: #fff; } .transparentHead { width: 210px; height: 102px; background: black; } .transparent { background: #4E85C5; height: 34px; opacity: .7; } .vertical { color: #fff; font: 12px verdana, helvetica, sans-serif; position: relative; top: -34px; } </style> </head> <body> <div class="transparentHead"> <div class="transparent"></div> <div class="vertical"> <a href=""><b>Transparent</b> Header</a> </div> </div> </body> </html> Anybody know of a way around this? Cheers I'm looking to add some angled corners to my tabs and maybe a bevel. Currently, my tabs are pure css with no js. Any way to angle the corners with css? Or am I going to have to whip out my Photoshop and use some images? I've checked out alistapart.com and found his code to be too buggy. Any links to some other tutorials would be much appreciated. NOTE: This is a learning project and NOT a REAL COMPANY My Site Hey, Ive used Macromedia Dreamweaver to design the following site. But for some reason the CSS seems to only work in IE. When I view the page in firefox, the CSS doesnt seem to work properly. Ive never encounterd this before, and have run out of ideas. What do you think? Website Here Cheers, Smitch Hi, I am new here, altough I have been comming here to search for solutions very often. I am a very great fan of CSS and have developed my own website (for my small bussiness) in pure CSS and XHTML. Now, when I started developing my website I created a layout. I have stuck with the same layout ever since. This was my idea, altough the layout is used in different ways by other websites. However something I did a lot was to browse other pure CSS websites. When there was something I liked I tried to recreate it (I never copied what other people did, always re-created myself). The problem is that I started my website with the following colour scheme; Black, White and Red. After browsing some website I must admit that I did copy coloures from other websites. Again it is only the coloures I copied! All the implementation (CSS, Xhtml, JavaScript is my own) and when there was an image I liked (for example for the borders) I recreated it on my PC. Now I am asking this question here because you people do CSS websites all the time. I know that some of you have been in this bussiness for some quite time and thus have the best advice on what should I do. Whether to leave my website as it is or else change it (note that I still did not launch my website). My question is related with Ethics as much as with legaility of what I did. I am giving some extra detail of what I mean by copy the colour scheme and recreating images. Copy Colour Scheme: Here I used a colour picker tool. I did not copy my colour scheme from just one website, but from various and used them within my layout (My layout is totaly different from the websites of which I copied the colours from). Recreating images: This has been done for the borders and shading. Again I have taken ideas from different websites. What I did is see how they did it and then recreate it. Sometimes I altered the images to better fit my requirments. However I have some images which I recreated nearly pixle by pixle the same altough I am not using the same image that the websites are using (I have recreated a small part of it). Now I checked the websites and there does not seem to be any copyright to protect images or colour scheme. Also I am not planning to insert my website for any competition. I must admit i like the design I have but not really intrested in any awards. I am new to web development and the only reason I am creating the website is because I wanted a web presence. Again, I have created all the CSS and HTML by myself using also some on-line tutorials. The only thing I see as a problem is the colour scheme and some images. dd I am working on this website and it shows correctly in FF mac and win, Safari mac and win, opera, netscape...etc, but in IE 7 and IE 6 ...the main content column is displaced below. #left is floating left and #text is floating right widths are correct. I even extended the width of the containers that wrap those two divs. Nothing. Since it's a site with Joomla framework, I waded through the code trying to look for a table within the #text div that could've been causing this. I set all tables to 80%width for IE. Already figured it out. So thank you. I'm not entirely sure where to put this, but as it concerns css, and quite possibly jquery, I'll roll it on into this forum. I'm working on a new site, and I'm not entirely sure as how to handle the links of it, ideally i'd like it to be a 1-page affair as much as possible, so what I thought is that each link would open inside a div. As you can see by the sketch below, I've a middle column which i dubbed 'SERVICES' that displays various categories of service that I have, hence the 3 centered columns below. Here's the sketch: Now at first thought, the 3 Categories would be a dropdown menu in essence, which I thought to make in jQuery, specifically a modified version of this: http://buildinternet.com/live/smoot...mated-menu.html Code for it is he http://buildinternet.com/2009/01/how-to-make-a-smooth-animated-menu-with-jquery/ On top of that, on hovering each link in this dropdown I thought to use a jQuery tooltip, that describes the service in brief, and once clicked more details would emerge of the service .. So if you fall back to my sketch, when a link in M1 is clicked, I'd want the details + a form to open in M2, as sketched. Th problem I'm having is two-fold: 1. I dont have enough JQuery experience to mesh the tool-tip with the propsed drop-down 2. I'm not onventive enough to figure out how to make M1 result in M2 (the sketch yet again! lol) Please please help me figure out a better way, or a good way to do this! I'm working on a video blog right now and I REALLY like the way this is set up. See Gary Vaynerchuk WineLibrary(dot)TV videos On Gary's videos there are always the Share Links above the video. These aren't part of the player but somehow built into the post template I imagine. I also imagine aside from the css/html aspect this task of creating the links is being automated but I could be wrong. Anyone have any ideas on how I could accomplish something similar? Thanks Hello, I am using an OS Commerce layout for a client's website. On this page - www.mts-diesel.com you will see how I have the homepage laid out in anticipation of design, with 3 divs of varying colors. One div with an id of #hp_left is where I want to put a nice jquery code. But when I insert that into #hp_left it breaks the whole layout, was seen here www.mts-diesel.com/index2.php I'm not sure what in the css in the code for this script is breaking my layout but Ithought someone here might be willing to shed some light. A big thank you. Tom I am working on the new home page which is based on a template. The left sideColumn is working fine, however I am having a few problems with the mainColumn layout. Here is a static image to show what I want it to look like Here are the problems I am having: 1) The #scroll box is place where I want it in IE but in foxfire it is right up against the left side of the #sideColumn partially hidden. There will be text that scrolls into this box and stops. I haven't started on the part yet - in case that makes a difference. Not my choice, but that is what the bosses want. 2) I want the image centered horizontal within the #mainColumn. Here is what I have for the css: #home img { margin: 5px auto 5px auto; } which I thought would do the trick, but it's not. 3) I want the p text to have a 40px margin on the right and left side like the .large does. Here is what I have for the css: #home p, .large { margin: auto 40px auto 40px; } It works for the .large (Welcome to Vitalograph), but not for the text below it. At one point I had it working, but after addtional changes fixing other problems, now it doesn't and I can't figure out why. Here is the xhtml starting at the 2 column part (wrapper): Code: <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <span class="category">Products</span> <ul> <li><a href="/products/spirometers.html">Spirometers</a></li> <li><a href="/products/clinical_trials.html">Clinical Trials</a></li> <li><a href="/products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="/products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="/products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="/resources/contact_us.html">Customer Support</a></li> <li><a href="/resources/training_services.html">Training & Services</a></li> <li><a href="/resources/exhibitions.html">Exhibitions</a></li> <li><a href="/resources/newsletters.html">Newsletters</a></li> <li><a href="/resources/downloads.html">Downloads</a></li> <li><a href="/resources/useful_links.html">Useful Links</a></li> <li><a href="/resources/industry_information.html">Industry Information</a></li> <li><a href="/resources/industry_information.html">Sitemap</a></li> </ul> </div> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- InstanceBeginEditable name="Main_Section" --> <div id="home"> <div id="scroll"><span>scrolling news will go hear and stop</span></div> <img src="/images/boys_bubbles.gif" width="485" height="333" alt="boys and bubbles" /> <span class="large">Welcome to Vitalograph</span> <p>Vitalgraph offers a wide range of spirometers along with other asthma management equipment with over 40 years experience. From simple hand-held units to sophisticated Windows based spirometry systems, we have it all. Check out our full line of respiratory equipment under the product category.</p> <p><a href="/about_us/about_us.html">more about us...</a></p> </div> <!-- InstanceEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> Here is the vitalograph_master.css: Code: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; background-color: #ffffff; color: #515151; margin:0px; padding:10px; } /*page container settings*/ #page { width: 750px; height: 600px; border: 1px solid #5094F9; background-color: #FFFFFF; overflow: hidden; margin: auto; padding: 10px 10px 10px 10px; text-align: left; } /*logo header and tag settings*/ #header { margin: 0; padding-bottom: 5px; width: 450px; height: 36px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; text-align: left; } #header img { vertical-align: -7px; } .tagline { color: #5094F9; font-size: 16; font-style: italic; font-weight: bold; display: inline; clear: both; line-height: 20px; margin-left: 10px; } /*top bar settings*/ #topbar { float: top; height: 20px; background-color: #5094f9; clear: both; padding-left: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:hover, #topbar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #topbar ul { list-style: none; margin: 0; padding-top: 2px; } #topbar li { display: inline; margin-right: 160px; } /*Main Section two columns under top section*/ #wrapper{ padding: 10px 10px 10px 0px; width: 100%; height: 100%; } #sideColumn { float:left; width:155px; height: 78%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; margin-right: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sideColumn a:link, #sideColumn a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; } /*footer*/ .footer { font-family: "Times New Roman", Times, serif; font-size: 9px; color: #999999; } /*text*/ .large { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 18px; font-weight: bold; margin-bottom: 15px; } Here is the home.css: Code: /*home page*/ #home { margin: auto; } #home img { margin: 5px auto 5px auto; } #home p, .large { margin: auto 40px auto 40px; } #home a:link, #home a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #home a:hover, #home a:active { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #990099; font-size: 12px; font-weight: bold; } #scroll { width: 560px; padding: 5px; background-color: inherit; border: 1px solid #5094F9; margin-bottom: 5px; } Any help or suggestions are greatly appreciated. Hi there and thanks for reading & helping! I am new to this site, but here is my question: I need to build about a 20 page website. I have been told I should do the "layout" for each page using CSS. Is it possible for each page to "link" to one CSS file for layout instructions? I have found suitable CSS layout templates but am unsure how to link each page to the external CSS file for a basic "header, 2 column, footer" layout, or if it is even possible? heyya, I'm doing a quick layout, and I'm running into some problems with my floating menu. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <style type="text/css"> body { margin:0; padding:0; background-color:white; font:normal 1em/150% Verdana,Arial,sans-serif; } #container { width:750px; padding:0; margin:0; background:#FAA; } #contents { width:566px; margin:10px 0 0 162px; border:1px solid #999; border-bottom:none; padding:10px; background:#FFF; } #contents p {font-size:80%;line-height:150%;} #menu { width:160px; background:#FFA; margin:0; padding:0; float:left; } img {border:none} </style> </head> <body> <div id="container"> <div id="menu"> <p>Wisi te quis lobortis dolor vel hendrerit consequat ex. Nulla hendrerit ad et. Praesent adipiscing nostrud dolore, feugait velit dolore dignissim. Aliquam blandit consequat ex blandit praesent hendrerit. Commodo in nonummy suscipit facilisi lorem ullamcorper dolore vulputate ea, ullamcorper eum duis delenit. Iriure nostrud qui, vulputate ut aliquip at, amet ut, erat, consequat autem. Facilisis sit lorem te illum suscipit zzril. Dignissim illum, duis accumsan. Et, duis enim euismod wisi commodo elit amet. Hendrerit nulla luptatum dolore tincidunt nulla nulla minim velit feugait accumsan, dolore minim, feugait nonummy, elit vero erat.</p> </div> <div id="contents"> <a href="#"><img src="bedroom-furniture.jpg" width="566" height="250" border="0" alt="" /></a> <h3>Welcome to mook</h3> <p>Wisi te quis lobortis dolor vel hendrerit consequat ex. Nulla hendrerit ad et. Praesent adipiscing nostrud dolore, feugait velit dolore dignissim. Aliquam blandit consequat ex blandit praesent hendrerit. Commodo in nonummy suscipit facilisi lorem ullamcorper dolore vulputate ea, ullamcorper eum duis delenit.</p> <p>Facilisis sit lorem te illum suscipit zzril. Dignissim illum, duis accumsan. Et, duis enim euismod wisi commodo elit amet. Hendrerit nulla luptatum dolore tincidunt nulla nulla minim velit feugait accumsan, dolore minim, feugait nonummy, elit vero erat.</p> </div> </div> </body> </html> readers digest version: I have a 750px container. My content div is 566, plus 2px for the border, plus 20px for the padding. Giving it a margin-left of 162px gives us a grand total of 750. IE seems to hate the padding - when i modify that it works fine - even changing the margin doesn't do anything. and there's an extra 2px between the menu and the contents just in case. So I can't figure why it's bumping down in IE. and i'm using v6, and have the doctype declared, so it shouldn't be in quirks mode. TIA, Greg |