CSS - Relative Textarea Col/row Size?
hello
is it possible to use css or some other artifice to make textarea/input elements adjust their row/col/size when the user increases/decreases the font size? i'm mostly talking about IE, because netscape/etc. seem to work it out just fine... setting a relative font-size for textarea/input elements on the stylesheet doesn't seem to do the trick. as usual, i tried looking around for info on this but found none, i'm beginning to think it just can't be done. any help would be really appreciated Similar TutorialsI'm creating a blog for someone, and my issue resides in <h2>. Using Wordpress, <h2> is typically the blog entry title. As you know, blog entry titles vary, because people put in different titles for different entries. I have <h2> formatted to my friend's likings, but an issue has arisen. If a blog entry title is particularly longer than the average, <h2> breaks into another line of text. This results in corrupting the layout entirely. So my question: How do I go about formatting <h2> so that the blog entry title text fills up the entire width of <h2> without breaking into a new line? Clarification (if needed): I want the font size to be dependent upon the physical length of text in the blog title Here's my code for <h2>. It resides in two containers of sorts. Code: h2 { float:left; font-family:"Franklin Gothic Medium"; font-size:55px;letter-spacing:-2px; width:728px; padding: 0; margin: 0; } This is my first post/topic. Be gentle! Thanks. Hello all! I'm having an odd problem. I have a select box and a textarea right next to each other that need to be the exact same dimensions. I figure, easy, just set the height and width via CSS properties, but that doesn't seem to be accurate at all - in either browser. I got out a neat program called pixel ruler to see exactly how many pixels each is displayed with. This is what happens: ie - Not counting borders, the textarea is the exact width and height. The select box is correct width (not counting the border. If you include the 1px standard blue border on any of these, they are 2px too wide or tall). However, the height of the select box(very annoying) seems to be somewhat ignored in that ie forces the select box to end at the end of a row, so giving it a height will just approximate a row number. It would be nice if I could fix this. Any thoughts on that? firefox- Not including the border, the select box is 2px too few in both the width and height. If you include the border it is exact. (which means that ie and ff are going to be hard to match.) But here is the REAL puzzler and the biggest reason for the post. Firefox seems to get the textarea size completely wrong. Not including the border, it is 2px too wide and tall! If you include the border, it is then 4px too wide and tall. I have no padding or margins on these by the way, so that can't be the answer. Any thought as to why firefox is putting extra width and height on textareas? Or any suggestions on making a textarea and select the same size in both ff and ie? Thanks! Having a strange problem with textarea font sizes in Firefox (1.06) See here - http://www.4L.ie/contact.php Text entered in the text fields is appearing correctly, but when entering text into the "Your Query" textarea, the font-size is noticeably smaller and less legible. It appears fine in IE6. My CSS relating to fonts is as follows: Code: body { font: 76% verdana, arial, helvetica, sans-serif; } input, select, textarea { font-size: 1em; } If I use pixels (ie font-size: 12px) there is no problem. Ems and % seems to mess things up. Anybody able to shed some light on this? A possible bug in Firefox 1.06? Thanks in advance. Hello again. Or should I say ( Time on my watch is 22:17 and because of time zones (+7 for US) ) good morning ? If go to the: http://www.odin.foxnet.pl/archives.html and expand these 2 menus : Navigation and Other - You will see my problem, and it was working before, now it looks, just like you can see. Second problem: solved And at the ending: Fileds for name and mail for comment wasn't so bad as now. Just look at it (2 eg: http://www.odin.foxnet.pl/2005/09/14/Tales/mj-przyszy-bokken.html http://www.odin.foxnet.pl/2005/09/15/Home/userfriendly-url.html ) Goodnight everyone. You are great people, offering great help. milosz-odin - known from this weigher Hi there, I'm completely new to CSS. I'm trying to do this more than one hour but can't get it right. Code: <font color='white'><font size='1' face=verdana size=1> I couldn't find the equivalent of this in CSS This is my last experiment but it doesn't seem to work either Code: fontstyle { color : #FFFFFF; font-family : verdana ; font-size :1;} Thanks I could see this as potentially being really easy to do or really hard to do. I'm hoping for the former. Suppose I have 3 divs, A, B, C and that I want the total width of A + B + C to equal the width of the screen. Suppose also that I want them to be inline. How can I have B to be a fixed width while A and C expand depending on the screen width (such that the width of A = the width of C)? So when using Netscape 7.2 & Opera 7.5 and MSIE 6.0, How do you get a simple tag like body { font-size:small; } to be equal in all browsers? Setting IE Text Size to Medium, and Opera's Zoom to 100% (both defaults) and Netscape 7.2 to 120% (not the default) is one way, but is there a CSS way? By the way, the child element hack "body>div {property}" wasn't working no matter what I tried, by not working I mean to say Netscape never would read it or apply it. It appeared to be that Opera & IE need to read the same value while Netscape needs to apply a larger size to be equal to IE's and Opera's rendering. B I am trying to create an image that stays in one place no matter how large the window is. This seems to work great in FF but when i open it in IE the image is not where i positioned it! Has anyone ever seen this? Thanks. Code: #apDiv4 { position:relative; left:370px; top:328px; width:154px; height:130px; z-index:1; clip: rect(auto,auto,auto,0px); margin-left: auto; margin-right: auto; } In the following code i need *Signup* to align just to the right of *Login*. Due to *SearchContainer* location, it must be absolute positioned. Thanks for the help. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <style type="text/css" title=""> #SearchContainer { position:absolute; z-index:1; width:210px; height:125px; border:1px solid red; } #SearchField { position:relative; z-index:3; width:200px; top: 5px; border:1px solid orange; } #LoginMessage { position:relative; z-index:3; width:200px; top: 10px; border:1px solid yellow; } #Login { position:relative; z-index:3; width:150px; top: 20px; border:1px solid green; } #Signup { position:relative; z-index:4; width: 25px; top: 20px; left: 10px; border:1px solid blue; } </style> </head> <body> <div id="SearchContainer"> <div id="SearchField">Epsum factorial non</div> <div id="LoginMessage">Lorem ipsum dolor</div> <div id="Login">Li Europan lingues<br>Li Europan lingues</div> <div id="Signup">xxx</div> </div> </body> </html> I'm having an issue using position: relative in IE6. Basically I'm doing this: Code: <style> .class1 { width: 900px; padding: 0px; margin: 0 auto 0 auto; } .floatimg { position: relative; top: -200px; left: 0px; padding: 0px; margin: 0px; } </style> <div class="class1"> <img class="floatimg" src="foo.gif" /> <p>Some text.</p> </div> So, basically I'm trying to move the image up a bit in the div. This works in the latest firefox and IE7, but in IE6 the image moves up, but the text does not. It stays as if the image had not been moved and this leaves a big gap. Okay I have a big problem and I don't know what is happening and it's really really bugging me. I have some extra space at the top of my page, it's about 10 lines in height. the items below the space are made up of two classes. They are .source and .quote. I tried using position:relative so that they move up but I have a problem. I tried Code: position:relative;bottom:7em; but that just amde them disapear leaving just their space. Also the .source iems are missing already and I don't know how to make them apear. I'm not hiding them at all at any point. http://142.177.157.241:8080/bikers/ the automatic parse URLs options doens't work even when it's used. Hi! I can not solve one problem. As You can see here bezlica.ru/joomla/ , I need to have image "contacts" at the bottom of the grave. Currently, it is relative to top and works fine on different resolutions. But, if content needs to be expanded like this bezlica.ru/joomla/index.php?option=com_content&task=view&id=12&Itemid=9, images drops down from the grave to bottom. Maybe there is a way to make it relative to the bottom of the screen, or some other solution? It needs to stay fixed where it is on different resolutions, that is why it is so hard for me! Any help will be appreciated. Regards, Konstantin. Hi, I'm following a tutorial and I would like to understand the position functioning. I have a box container and some elements in. In the css, the are all set relative position. I don't understand why the second element (AMPT) has its contain offset and third one (Writing) is not. I understand that the first element has like a reference the container box. I would sincerely glad if you can help me to understand the relative positioning. Thanks in advance. PS: I'm using firefox and here is the code: artefact89.free.fr/relative.html (without www) I am trying to have div mian, lightback, and darkback extend vertically to accommodate all cnav and content items. Obviously it is not working, but I cannot seem to spot my mistake. I would be very grateful if someone would be able to help me find where I am going wrong. HTML. Code: <div id="main"> <div id="lightback"> <div id="darkback"> <div id="contentnav"> <div class="cnavlink"></div> <div class="cnavspacer"></div> <div class="cnavitem"></div> <div class="cnavitem"></div> <div class="cnavspacer"></div> <div id="cnavbox"></div> </div> <div id="contentbox"> THIS IS CONTENT </div> </div> </div> </div> CSS: Code: #main { width: 761px; position: absolute; left: 100px; top: 328px; height: auto; } #lightback { background-color: #222322; border-top-width: 0px; border-right-width: 3px; border-bottom-width: 0px; border-left-width: 3px; border-top-style: none; border-right-style: solid; border-bottom-style: none; border-left-style: solid; border-top-color: #C6A084; border-right-color: #C6A084; border-bottom-color: #C6A084; border-left-color: #C6A084; position: relative; height: auto; width: 755px; } #darkback { background-color: #131313; height: auto; width: 745px; margin-right: 7px; margin-left: 4px; position: relative; } #contentnav { position: relative; width: 150px; margin: 4px; float: right; background-color: #131313; border-top-width: 10px; border-bottom-width: 10px; border-top-style: solid; border-right-style: none; border-bottom-style: solid; border-left-style: none; border-top-color: #424242; border-bottom-color: #424242; } .cnavspacer { background-color: #424242; height: 10px; width: 100%; position: relative; } .cnavlink { background-color: #282828; background-repeat: repeat; height: 21.5px; width: 100%; position: relative; margin-top: 2px; margin-bottom: 2px; } .cnavitem { width: 100%; height: 150px; margin-bottom: 4px; position: relative; background-color: #424242; margin-top: 4px; } #cnavbox { width: 100%; height: 50px; margin-bottom: 4px; position: relative; background-color: #424242; margin-top: 4px; } #contentbox { background-color: #222322; width: 577px; position: relative; float:left; border-top-width: 10px; border-right-width: 1px; border-bottom-width: 10px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #424242; border-right-color: #424242; border-bottom-color: #424242; border-left-color: #424242; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 3px; } Im working on a project that required some css that I'm not used to using to pull off an effect. here is the url http://www.staging.crea8te.com/ftea I'm having one issue: Issue: the basic structure is <div1>position: relative <subdiv></div>position:absolute <subdiv></div>position:absolute </div> <div2> </div> <div3 </div> I'm not a pro at using positioning by any means with something like this and I don't understand why div2 is sitting at the top instead of at the bottom of div1. div 2 and 3 display correctly .. just arent showing up at the bottom of div1 i can paste the html and css if necessary it is just kind of a lot and didnt want to have a huge post.... any ideas? Hi, Code can be found below and output as it is currently @ http://www.generating-sets.com/index.new.php Anyway, I have the box with the id of 'newsbar'. My problem is i want this box in the following posistion: It should sit on the bottom footer bar and be in between the two sidebars. The code below makes it overlap the two sidebars. So how could i make the posistion relative to the two side bars so it nests in the middle? All this CSS is doing my head in, but for glory without tables! lol Charlie PHP Code: h1 {font-size: 1.4em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h2 {font-size: 1.3em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h3 {font-size: 1.2em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h4 {font-size: 1.1em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} h5 {font-size: 1em; font-family: Times, "Times New Roman", serif; font-weight: bold; text-align: left;} a:link {color: #ffffff; text-decoration: none;} a:hover {color: #dedbcb; text-decoration: underline;} a:visited { color: #ffffff; text-decoration: none;} body {margin: 0; padding: 0; font-family: sans-serif; font-size: .7em; line-height: 1.4em} div#header {padding: 2%; text-align: center; background-color: #0e2e3b; color: #ffffff; margin-bottom: 2px; border-bottom: solid #ffffff 1px} div#navbar {padding: 0%; text-align: center; background-color: #0e2e3b; color: #ffffff; margin-bottom: 0px; border-bottom: solid #ffffff 1px} div#newsbar {padding: 1%; text-align: center; background-color: #0e2e3b; color: #ffffff; margin-bottom: 0px; border: 2px #ffffff solid; position: relative;} div#footer {padding: 0%; text-align: center; color: #ffffff; clear: both; background-color: #0e2e3b; border-top: solid #ffffff 1px} div#maincontent {padding: 2%; text-align: justify; margin-left: 150px; background-color: #0e2e3b; color: #ffffff; margin-bottom: 2px; border-right: solid #ffffff 1px; border-left: solid #ffffff 1px} div#leftcolumn {padding: 2%; float: left; text-align: right; background-color: #0e2e3b; color: #ffffff; width: 150px;} div#rightcolumn {padding: 2%; float: right; text-align: right; background-color: #0e2e3b; color: #ffffff; width: 10px;} I am trying to learn CSS Positioning in an effort to move away from table-based layout. I use some pretty complicated layouts and I am a big fan of the "stretch" effect for my site headers. As my first project, I am converting a site that uses a stretch header, and in table layout, used to be divided into 5 columns. I have managed to re-create the header almost as good as the original with just 3 divs, using absolute positioning, z-index, and a background image. Then I used relative positioning to create the div for the main content, and I was planning to do another relative-positioned div for the footer. I feel that I'm very close but could use a little help to get over the hump. I have two main problems: 1. When you resize the window horizontally below about 850px, the images in the header start to overlap. I would like them to "bump" each other and have a scrollbar appear. I've tried to fix this using the min-width property in various divs, and I tried to use a wrapper div, but nothing seemed to work very well. This is something I can live with, but any tips would be appreciated. 2. Relative positioning seems to work fine for the main content div (#middlebox in my .css). However, I did the footer div in the same manner, and it only works in Firefox, not IE. If I could get it to work in both Fx and IE I'd be happy - I don't care about any other browsers. 3. Any other tips and tricks that would make it cleaner or better, etc. would be appreciated. Remember I am a n00b so go slow. Original site (tables): http://www.gpleague.com New test site (css): http://www.gpleague.com/cssp.htm Css file: http://www.gpleague.com/csstest.css I'm trying to create these two elements that are 100% of their parent element minus the height of anything above or below them. For example: Code: <html> <head> <style type = "text/css"> body { margin: 0px; padding: 0px; height: 100%; color: #FFFFFF; background-color: #636E90; } div.everything { padding: 0px; margin: 0px; margin-left: auto; margin-right: auto; width: 750px; height: 100%; background-color: #4A61A8; } .top { background-color: red; height: 120px; } .left { float: left; margin-left: 0px; width: 125px; height: 100%; background-color: #000000; color: #FFFFFF; } .right { float: right; width: 125; height: 100%; margin-right: 0px; color: #000000; background-color: #FFFFFF; } </style> </head> <body> <div class = "everything"> <div class = "top">Top</div> <div class = "left">Left</div> <div class = "right">Right</div> </div> </body> </html> The problem is that the "left" and "right" elements extend beyond the bottom of "everything," and more precisely they're extending the height of "top" off the bottom of "everything." That probably read poorly. The "left" and "right" elements are doing what they're supposed to do in that they are 100% of the parent element "everything." The problem is that this height isn't derived as being height of "everything" - height of "top", but instead it's just the absolute height of "everything." I've been trying to figure out how to make their height 100% of their parent element after other elements, such as "top", are placed inside the same parent element. |