CSS - Text Boxes, Css, And A Big Headache
I came across this site with a google search. I have been trying to make a website for my new business and I've been trying to learn CSS. Everything went fine until I tested resolutions out yesterday, I noticed they changed. I've been trying to place a text box in middle of an image but I can't get it to work correctly... a perfect example of what I'm trying to achieve is found he http://www.myspace.com/nourotika
I have tried and tried and this is the website that came closest to my problem... My code would be: Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #000; } --> </style></head> <body><center> <p style="position: absolute; top: 735px; right: 314px; width: 537px; padding: 4px; background-color: #000; font-weight: bold; font-size: 11px; font-xolor: #F00; height: 548px; color: #909; overflow: visible; z-index: 1;">content goes here</p> </div> http://i158.photobucket.com/albums/t108/Katouuffxi/regular.jpg This would be the regular resolution I'm looking for http://i158.photobucket.com/albums/t108/Katouuffxi/resproblem.jpg And this would be my screen resolution problem Sad I really don't know how in the world to do it and I'm just so close from finishing everything... help would be much much appreciated. Similar TutorialsI'm pretty new to CSS so bear with me if this is a silly question. I want to go totally CSS and 0 tables. 1 problem that I've been having with my site is that I have several forms for data entry. These are of course done in 2 column tables, label in the 1st column, text box in the right. The problem I'm having is that I cannot get the text boxes to line up properly using CSS. I am trying a test page simulating a login page. But since the words Username and Password are different lengths, the left edges of the text boxes don't line up evenly. What is the best technique to get CSS to display 2 columns like a 2 column table where the first 'column' contains a text label and the 2nd column has the input boxes aligned nice and neat? Hi, I'm currently using an attribute selector - input[type="text"] to put borders around text boxes, which works perfectly in firefox, opera and mozilla, but ie doesn't seem to want to know. It will do textareas, but that seems to be about the extent of it's abilities. I would like to do something like: Code: input[type="text"] { border-color : #F98537; border-style : solid; border-width : 1px; } The only way I can find to do a text box in ie is to use just input{...}, but that affects every input object, which is not what I would like to do. I would like to be able to set each input object separately, but as I said ie is the only one that is giving a problem. So can anyone tell me how to get ie to display borders only around text boxes, without affecting other input objects? DebbieLeigh Hi there, I have this basic CSS: Code: input.text { font-size: 11px; border: 1px #93A6C6 solid; background-color: #FFFFFF; color: #3F5674; font-family: Arial, Helvetica, sans-serif; } select { font-size: 11px; background-color: #FFFFFF; color: #3F5674; padding-right: 3px } textarea { font-size: 11px; border: 1px #93A6C6 solid; background-color: #FFFFFF; color: #3F5674; font-family: Arial, Helvetica, sans-serif; letter-spacing: 0px; word-spacing: 1pt; } The input box style isn't working correctly. The text I type in is coming out black and in a larger font than specified. If I just use style input rather than input.text it does work, but then it will put square borders around radio check boxes, which I don't want. Any ideas why it isn't working? This is the form it is being used on: Code: <form name="Albums Search" method="get" action="searchresults.php"> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"> <input name="searchterm" type="text" tabindex="1" size="50" maxlength="75"> </div></td> <td rowspan="2" align="center" valign="middle"><div align="center"> <input type="submit" value="Search"> </div></td> </tr> <tr> <td><div align="center">Artist: <input name="searchtype" type="radio" value="artist" checked> Title: <input name="searchtype" type="radio" value="title"> Year: <input name="searchtype" type="radio" value="year"> </div></td> </tr> </table> <p> <textarea name="textarea"></textarea> </p> </form> Thanks Here is my development site: http://www.pursuedbybear.com/sunwashed/ Is there any way to vertically center the links in the left hand nav inside their orange boxes without resorting to a table? I've tried vertical-align: middle and padding-top the #nav ul li a element, but neither works. I've done some searching here and the results haven't been encouraging - anyone have something different I could try? I mean really, this isn't exactly a super-complicated or obscure thing I'm trying to do, you'd think CSS could handle it. Any advice? Not sure if this is an HTML or CSS related question but here goes... googling gives me nothing. I have a form that I've built and on occasion one or two of the text fields may have text in side them but I've sent the text field to 'disabled' so that the user cannot change the information inside. The problem is is that some of my users are a little bit older and have a hard time seeing what is inside of the disabled text field because its already grayed out and the text inside is gray. Does anyone know if there is a way to change this or is it just a default with internet explorer? Thanks! I recently put a section on my web page that allows people to submit data to database, and it works but it looks kind of plain. And I had seen this web page (http://textsfromlastnight(dot)com/Submit-a-Text.html) and saw how they seem to use a custom text box for their submit form. Can anyone explain to me how they did this? Or if its done with something other than CSS possibly point me in the right direction to learn? Thanks in advance!! So I came up with this lovely design for the company I'm working for, because they're website now is just utter crap. I figured instead of coding my usual way (a mess and unvalidated) I'd start off making it as clean and css-friendly as possible. I've run into some major issues, some common and some not. If any of you could help me, I would be extremely grateful. My main problem is my issue with internet explorer. I've positioned everything to match up perfectly in Firefox, the site looks great and is aligned fairly well. However, when the site hits IE, everything shifts a couple pixels and throws everything off. Anyone know why this is happening? There is also a gap at the top of the page in IE, which isn't present in firefox. I also can't figure out how to pus the footer to the bottom. I wanted another footer that stretched the whole page at the bottom (similar to the top), with a sort of 'prefooter' on top of it. I can't figure out how to just push a regular footer to the bottom, and I've tried all the fixes I can find online. Any idea why? Here is the site: Code: http://www.chromaticstudios.net/AVT/ Hi All, I am having trouble trying to get the columns in this layout to work properly: http://www.lampdesign.co.uk/desdev/vsc/ The following image is how it should be shaping up: http://www.lampdesign.co.uk/desdev/vsc/vsc_real.png Problems: - In firefox the left column content is floating above the footer image - In IE the left column content appears to be pushing the right content downwards I have avoided padding and margins as far as possible. Relevant Source: <div id="contentcontainer"> <div id="leftcolumn"> This is the left column This is the left column This is the left column This is the left column </div> <div id="pagecontent"> This is the page content </div> </div> </div> <div id="footercurve"> </div> Css: #pagecontainer { background: url('images/global/pagebg.png'); width:790px; margin:0 auto; text-align:left; color:#333; } #contentcontainer { width:790px; margin:0 auto; } #leftcolumn { width: 180px; margin:0px; padding: 0px; font-size: 14px; color: #fff; float: left; } #pagecontent { width: 608px; margin: 0px; margin-left:182px; padding: 0px; font-size: 12px; } #footercurve { background: url('images/global/footercurve.png'); width:790px; height: 10px; margin:0 auto; text-align:left; color:#333; font-size: 0px; } If anyone can shed any light on what I am doing wrong, I would be most grateful. Thanks, Vince yeah so I just need a simple help with something. Its some basic stuff for a myspace layout.. I have got an image to span.. i received help here a while ago with it. but I can't figure out how to hover & span together. like for instance.. the idle image icon is black & white.. then when I mouseover it i want it to alternate to the colour image and also span the large image of itself to the side. I cant seem to combine them.. its either one or the other. just hover colour image over b&W.. or jus span large image. been noob i dont really know what to chop and mix. so how can i do it?? thanks for any help :P Hey DevShed, I'm having issues with the CSS, and floats. I basically float everything to the left, and I'm having issues on the very far right with a space I cant fill basically, and on the left side I'm missing the 1px border from my wrapper div. The "user" div is supposed to be a few pixels wider, I chopped off some pixels because when I made it longer it dropped down to below the "adheader" div. Here's my current code; index.php PHP Code: <body> <div id="wrapper"> <div id="topnav"></div> <div id="banner"> <img src="images/banner.jpg" /> </div> <div id="header"></div> <div id="left_content"> <div id="newsheader">Latest news</div> <div id="box_1"> <img src="images/news.jpg" /> </div> <div id="box_2"> This is content blah blah blah </div> <div id="bottom_left"> </div> <div id="bottom_right"> </div> </div><!--end of left_content--> <div id="right_content"> <div id="adheader"></div> <div id="user"></div> <div id="main_content"></div> </div><!--end of bottom_right--> </div><!--end of container--> </body> global.css PHP Code: #wrapper { margin: 0px auto; padding: 0px; width: 977px; border-left: 1px solid #B1B1B1; border-right: 1px solid #B1B1B1; } #topnav { background: #F0F0F0; background-image: url('images/top_back.gif'); background-repeat: repeat-x; margin: 0px; padding: 0px; width: 977px; height: 18px; } #banner { background: #282828; background-image: #url('images/banner.jpg'); border-bottom: 5px solid #D2D2D2; margin: 0px; padding: 0px; width: 977px; height: 72px; } #left_content { background: #6D6D6D; background-image: url('images/div_back.gif'); background-repeat: repeat-x; border-right: 1px solid #FFF; padding: 0px 0px 0px 0px; width: 476px; height: 100%; float: left; } #newsheader { background: #6D6D6D; background-image: url('images/div_back.gif'); background-repeat: repeat-x; margin: 0px 0px 0px 0px; padding: 0px; width: 476px; height: 29px; } #right_content { background: #282828; padding: 0px; margin: 0px; width: 495px; height: 100%; float: left; } #box_1 { background: #6D6D6D; padding: 0px; margin: 0px; width: 476px; height: 249px; } #box_2 { background: #DADADA; padding: 0px; margin: 0px; width: 476px; height: 96px; } #bottom_left { background: #DADADA; background-image: url('images/div_back.gif'); background-repeat: repeat-x; border-right: 1px solid #FFF; padding: 0px; margin: 0px 1px 0px 0px; width: 236px; height: 29px; float: left; } #bottom_right { background: #DADADA; background-image: url('images/div_back.gif'); background-repeat: repeat-x; border-left: 1px solid #FFF; padding: 0px; margin: 0px; width: 237px; height: 29px; float: left; } #lnewscontent { background: #DADADA; border-right: 1px solid #FFF; padding: 0px; margin: 0px; width: 476px; height: 96px; } #adheader { background: #6D6D6D; background-image: url('images/div_back.gif'); background-repeat: repeat-x; border-right: 1px solid #FFF; border-left: 1px solid #FFF; margin: 0px 0px 0px 1px; padding: 0px; width: 209px; height: 29px; float: left; } #user { background: #6D6D6D; background-image: url('images/div_back.gif'); background-repeat: repeat-x; border-left: 1px solid #FFF; margin: 0px 0px 0px 1px; padding: 0px; width: 281px; height: 29px; float: left; } Here's a basic idea of what I'm going for: img683.imageshack.us/img683/6540/layoutsamp.gif PLEASE help me, I've been going at this for hours. I'm out of ideas! Hallo, I have in several cases serious problems with floating boxes. Not with the standard layout's like here described http://css.maxdesign.com.au/floatutorial/ but with more complicated layouts. I know to place the float attribute but have problems with setting the clear attribute. Does some know a good source where I find more information or documented examples ? Finally I can fix my problems, but it take so much time of testing... Thnaks hi, Im making a site, and i decided to use CSS instead of tables. I have used basic CSS before, but it gets abit harder when i start making boxes etc. Here is my code so far - layout.css - (one that gets included on each page) Code: @import "style.css"; body { margin:10px 10px 0px 10px; padding:0px; } #leftcontent { position: absolute; left:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #centercontent { background:#fff; margin-left: 199px; margin-right:199px; border:1px solid #000; voice-family: "\"}\""; voice-family: inherit; margin-left: 201px; margin-right:201px; } #shoutbox { position: absolute; right:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #rightcontent { position: absolute; right:10px; top:50px; width:200px; background:#fff; border:1px solid #000; } #banner, #footer { background:#fff; height:40px; border-top:1px solid #000; border-left:1px solid #000; border-right:1px solid #000; voice-family: "\"}\""; voice-family: inherit; height:39px; } #footer { background:#fff; height:40px; border-bottom:1px solid #000; border-left:1px solid #000; border-right:1px solid #000; voice-family: "\"}\""; voice-family: inherit; height:39px; } #banner h1 { font-size:16px; padding:10px 10px 0px 10px; margin:0px; } #shoutbox, #rightcontent p { font-size:10px } style.css - text formatting etc. Code: body { font: 12px/1.2 Tahoma; background:#ddd; padding:0px; margin:0px; } a { text-decoration:none; font-weight:bold; color:#c00; } pre { font-size:11px; color:blue; } ol { margin-right:40px; } li { margin-bottom:10px; } p,h1,pre { margin:0px 10px 10px 10px; } h1 { font-size:14px; padding-top:10px; } it produces a good layout, with a header, 3 coloums and a footer. whoever, the boxes expand at different rates and the footer doesnt move down. the header also doesnt expand. i know how i can fix this, but i dont know how to fix it without making it so that its locked at a resolution. i would like the site to exapand as the window is made larger. here is an image of what i get - and this is what i am aiming to acheive - as you can see, i want all the boxes to be the same length, which is defined by the size of the largest box. also, i want to create 2 or more boxes on the left, only the bottom of which gets made longer. on the first image you cannot see the extra box because it is covered by the other one :-/ i would be greatful for any help you guys can provide me thanks, dynamyt I have 4 or 5 form controls that I want in a horizontal line. Each form control has a label above it, and I'm using <br>s to position the form control below the label. I thought that wrapping each "label<br>form control" with a <span> would turn the whole thing into an inline block, where the next <span> would line up next to it, like the next <td> in a <tr>. Code: <div id=secondline> <span id=ed> <b>Event Definition</b>:<br> <textarea name=inject cols=45 rows=6></textarea> </span> <span id=after> <b>After</b><br> <select name=next size=8 multiple> <option value=0>0 ... <option value=100>100 </select> </span> </div> but, alas, it doesn't work like that. How can I get Code: <tr> <td>label<br>form_control</td> <td>label<br>form_control</td> </tr> behavior without using tables? Im trying to replicate the vertical navigation style that is used on the Mozilla Firefox Website (as seen to the left). I have sucessfully done this useing images, with the exclusion of a space problem between the items and the end images in FireFox. I am using the strict.dtd and am frustrated with this problem. Iff anyone can help me create a nav with this style that would be wonderful. Here is the css im using: Code: .cssnavend { position:relative; font-family: arial, verdana, helvetica, sans-serif; display: block; width: 209px; height: 9px; margin: 0; margin-bottom:0px; padding: 0; } .cssnav { position:relative; font-family: arial, verdana, helvetica, sans-serif; background-image: url(images/but-over.jpg); background-repeat: no-repeat; display: block; width: 209px; height: 31px; margin: 0; margin-bottom:0px; padding: 0; } .cssnav a { display:block; font-size: 11px; width: 209px; height: 31px; display: block; float: left; margin: 0; padding: 0; color: #096CCE; text-decoration: none; } .cssnav img { width: 100%; height: 100%; border: 0; } .cssnav a:hover{ color: #000; } * html a:hover { visibility:visible } .cssnav a:hover img{ visibility:hidden } .cssnav span { position:absolute; left:7px; top:7px; margin:0; cursor: pointer; } #box { margin-top: 10px; padding: 0; width: 209px; display: block; } #boxtop { width: 209px; height: 11px; } #boxcontent { width: 209px; background: #DFE5EB; } #boxbottom { width: 209px; height: 11px; } #boxtext { width: 209px; background: #DFE5EB; padding: 2px; } The following code is me testing my css. The first group is useing the cssnav styles. The 2nd group is using the box styles. The 3rd group is a try at making a content box with rounded corners that is a spacific width. Unfortunatly, the content of the box will not wrap to the width of the box, instead it continues on 1 line and outside the box. Code: <div class="cssnavend"><img src="images/but-top.jpg"></div> <div class="cssnav"><a href="index.php"><img src="images/but-up.jpg" /><span>Home</span></a></div> <div class="cssnav"><a href="#"><img src="images/but-up.jpg" /><span>This is a test</span></a></div> <div class="cssnav"><a href="phpbb/index.php" target=_blank><img src="images/but-up.jpg" /><span>Forum</span></a></div> <div class="cssnavend"><img src="images/but-bot.jpg"></div> <br><br> <div class="box"> <div class="boxtop"><img src=images/but-top.jpg></div> <div content="boxcontent"> <div class="cssnav"><a href="#"><img src="images/but-up.jpg" /><span>Home</span></a></div> <div class="cssnav"><a href="#"><img src="images/but-up.jpg" /><span>This is a test</span></a></div> <div class="cssnav"><a href="#"><img src="images/but-up.jpg" /><span>Forum</span></a></div> </div> <div class="boxbottom"><img src=images/but-bot.jpg></div> </div> <br><br> <div class="box"> <div class="boxtop"><img src=images/box-top.jpg></div> <div class="boxcontent"> <div class="boxtext">This is some text inside of the box. This text should wrap and be padded.</div> </div> <div class="boxbottom"><img src=images/box-bot.jpg></div> </div> Thank you all who help. My boxes line up horizontally perfectly in Firefox but not in IE7 (not suprisingly). Because of the rules I can't show you the link but the html places two boxes side by side lined up so that they are the same distance from the top. It looks right in Firefox but IE7 drops the right box about 10 pixels or so. My Html is this: <div id="newsboxleft"> <div id="newsboxright"></div></div> My CSS is this: #newsboxleft { margin: 10px auto; position: relative; top: 0px; left: -187px; width: 350px; height: 142px; background: url(../images/newsboxleft.jpg) repeat-x top; border-top: 0px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; padding: 0px; clear: both; } #newsboxright { margin: 10px auto; position: relative; top: 0px; left: 373px; width: 350px; height: 142px; background: url(../images/newsboxright.jpg) repeat-x top; border-top: 0px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; padding: 0px; clear: both; } I hope someone can help. Thanks. Hello: I'm trying to place two drop down boxes at the right of my page. When I view the pages in Firefox and Internet Explorer, they are so far off. You can view the page yourself by visiting: http://www.informedmortgage/100-financing.html I've tried changing widths, margins, etc and am having no luck. I can use some help. I hope someone can help me out. Thank you. Back to top Hi I am creating a new site for a friend in Wordpress ilovelifebecause.com I can usually muddle through in css to make changes, but i'm stumped at the moment. What I am trying to do is swap around the two cream coloured boxes so the larger one is on the right, the thinner one on the left and the blue box in the middle still. I've tried a number of things in the css file but can't seem to find the right method - can anyone help? many thanks in advance Paul Hello, I created a site with floating frames and it looks good in IE6 and FF/Mozilla. But I have one problem: I use in my dynamic layout an ID more then once (thats not OK according w3 validation) I tried to do something with pseudo classes but this works not really goed. My "uni" thumb box is used on two diff. pages The skyscraper: http://www.all4yourwebsite.com/ and the result/search page: http://www.all4yourwebsite.com/search.php I know there is a solution, but because the tumbbox have to be much flexible the solution must be simple as the current (wrong) solution. Anyone an idea? Hi guys, I am trying to achieve the following: Box 1 | ------ Box 2 | ** With a 3rd box to the right of box 1&2 I have got this far but cant work out how to do 'box2' Code: <div id="box2"> box 2 </div> <div id="box3"> box 3 </div> Code: #box2 { float: left; padding: 10px; margin: 20px; background: #ffffff; width: 100px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 100px; } html>body #box2 { width: 100px; /* ie5win fudge ends */ } #box3 { float: right; padding: 10px; margin: 20px; background: #ffffff; width: 100px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 100px; } html>body #box3 { width: 100px; /* ie5win fudge ends */ } Can anyone possibly help? i have two css boxes on the company lan, and for one person the two boxes wont appear? is this a problem with internet explorer? |