HTML - Insert Line Break In Middle Of A String
I know "<br>" causes a line break outside of a string, but how can I insert one INSIDE a string?
Ex: <textarea value="" > example text <LINE BREAK> more example text </textarea> Similar TutorialsI am new to HTML coding I am trying to remove the line break, after my header and not sure how to do it. Here is my code: <h5 style="background-color:red;"><a href="java script:alert('Find & Click on your old Printer' + '\n' + 'Select '+ 'OPEN' + ' ...Do you want to open or save this file?' + '\n' + 'Select ' + 'RUN' + ' ...The Publisher could not be verified.')">Click Here for Directions on REMOVING your printer</a></h5> I would like to remove the blank line that the header creates. Thank you Before I get totally flamed, I'm sure you get this question almost daily. However, I'm aware how to fix it, however I can't figure out why it's not working. As you can see above, the "test" div needs to be beside the "Hosting" div. So move the bottom one to the right of the first one. But how, is the question. Here's the HTML: HTML Code: <div id="plans"> <center><h2>Hosting Plan #1</h2></center><br /> <img src="images/arrow_right.gif" /> <b>10MB</b> Disk Space<br /> <img src="images/arrow_right.gif" /> <b>Unlimited</b> Data Transfer<br /> <img src="images/arrow_right.gif" /> <b>Unlimited</b> Domains, FTP, MySQL accounts<br /> <img src="images/arrow_right.gif" /> <b>2</b> E-Mail accounts<br /> <img src="images/arrow_right.gif" /> <b>Just $0.99/mo or $10/yr</b><br /><br /> <center><a class="order_button" href="order.php">Order Now!</a></center> </div> <div id="plans"> test </div> I've tried to put that block of code into another <div> to even it out all out with display: inline, but that doesn't work. I am also unable to use spans, although that would be the obvious route. So, does anybody have a solution? Thanks! Ok, so here is the problem, i am working on my page, and i wanted to place an image of a home for sale sign on the page and end in a checkerboard divider, and wrap my text around it... everything looked great until i got to the bottom of the page, then i realized my footer was shifted way right, and so was my checkerboard... what did i do wrong? http://www.budgetbathusa.com/real-estate-remodel.php here is the relevent code... <img style="float:left;" src="http://budgetbathusa.com/images/real_estate_remodel2.jpg"> <? include('./includes/contact_form.inc.php'); ?> <img style="float:left;" src="http://budgetbathusa.com/images/sidebar.jpg"> <center><h2>Selling Your Home? We Can Help.</h3></center> <p> This product is for all of you who are in the process of selling your home, and would like to get your home off the market as fast as possible. Everyone knows that the two rooms that will sell your home are kitchens and baths, but what most people dont know is that the average price to remodel those rooms are $57,232 for kitchens, and $15,899 for bathrooms. Those figures are not fictitious either, they are pulled from national average costs at Remodeling Magazine's own figures (you can see those figures at Remodeling magazines <a href="http://www.remodeling.hw.net/2008/costvsvalue/division/south-atlantic.aspx">Cost vs. Value webpage.)</a></p> <p> As you already know, home staging requires moving furniture, painting walls, and other miscellaneous activities to make your home more attractive to prospective buyers, but there are many other remodeling projects you need to seriously consider. One of those is that bathroom you never like showing to your guests, or that bathroom that isn't that bad, but has that mildew on the grout, and fixtures from 1957. You have two options...<ol> <li>You can do a total remodel, that will cost almost $16,000 and sell your home quickly, and for more than you were asking for. (but who has an extra $16,000 laying around!)</li> <li>Or you can choose from our A la Carte list of bathroom remodeling services, that will cheaply, and effectively remodel your bathroom for a fraction of the cost of a custom remodeling job, <b>and</b> be of a better quality than a bathfitter bathtub liner.</li> <h2>The List:</h2> <p> So we have brought you a list of different services at the lowest prices we can offer. You get to choose what you need, and not get anything extra. All we require is that you pick $3000 dollars worth of remodeling. and we will be happy to come out and help your bathroom out. These prices are non-negotiable, and are a great deal just by themselves. Then fill out our contact form, or give us a call, and we will write up the contract, and do the work.</p> <ul><font size="4" color="#5eadfd"><b> <li>regrout bathroom (silicone included): $2.75 per square foot</li> <li>re-silicone bathtub without grout: $125</li> <li>Replace Shower Door: $750</li> <li>Replace Vanity and Vanity Countertop (Faucet included): $800 {upgrades available}</li> <li>Replace over the toilette Storage Unit: $250</li> <li>Replace Medicine Cabinet: $250</li> <li>Replace Toilette: $400</li> <li>Replace Trim: *</li> <li>Glass Shelving Addition: $100</li> <li>Repaint Bathroom: $600 (Price based off of an 8x5 bathroom)</li> <li>Upgrade lighting: $250 per light</li> <li>Change faceplates: $5 per plate</li> <li>Upgrade Sink Faucet: $375</li> <li>Upgrade Shower Faucet: *</li> <li>Change Toilette Seat: $150</li> <li>Replace Window $475</li> <li>Plumbing Inspection: $100</li> <li>Replace Sink Trap $250</li> <li>Tub Refinishing: $900 per tub.</li></font></b></ul> <p> <b>* :</b> Prices vary greatly depending on different situations, just give us a call and we can work it out. <p> <b>Note:</b> Most prices are dependent upon an allowance for material, if you would like something nicer, we will gladly upgrade for you</p> <img src="/images/checker_hr_24.gif" width="744" height="24" style="float:left;" alt="----------" /> <br /> <? include_once('./includes/footer.php'); ?> in the past when ever I have string that is longer than the width specified in the <td>it always automatically line breaked for me. But now I am encountering an issue with the <td> stop auto line breaking, and instead just increase the width of the table to make the string fit in 1 line. if anyone know whats possibly causing this problem please reply, any thing suggestion is greatly appreciated. Thanks I can't seems to be able to get it to a valign middle at oscommerce but on my html page it worked fine. Also why is the html page gray bar bigger than the oscomerce gray bar? Code: <table width="100%" height="30" align="center" border="0" bgcolor="grey"> <tr> <td class="bar1" valign="middle" height="100%"> <ul id="navlist"> <li id="active"><a href="/index.html" id="current">Home</a></li> <li><a href="index.php">Collections</a></li> <li><a href="/payment.html">Payment & Shipping</a></li> <li><a href="/about.html">About us</a></li> <li><a href="contact_us.php">Contact Us</a></li> </ul> </td> </tr> </table> Code: .bar1 {font-family:Arial, Helvetica, sans-serif; font-size: 14px; text-align:center;} #navlist ul {margin-left: 0;padding-left: 0;white-space: nowrap;} #navlist li {display: inline;list-style-type: none;} #navlist a { padding: 15px 20px; } #navlist a:link, #navlist a:visited {color: #fff;background-color: grey;text-decoration: none;} #navlist a:hover{color: #fff;background-color: #6D6968;text-decoration: none;} actual site http://janlevin.com.my/ i'm new so please be gentle! I have recently designed and put up a new website. url he http://www.thecomicstrippresents.webs.com it's the first time i have used photoshop to design a website and for a first attempt i dont think it looks half bad. i'm sure as well as looking a whole lot worse, it could look a lot better. first off can someone tell me the ideal resolution i need to save the images as some of the images are grainy and pixely. secondly, can someone suggest what i can use to put content in the mid section? a lot of the content is longer than the box allows so for the time being i have put an Iframe there, the iframe is ok temporarily but will be a bit of a as far as SEO goes and up until i changed to iframe i was coming up second page of a google websearch for 'The Comic Strip Presents' please can you someone help? cheers Em Hi I am trying to make the image "y.bmp" and the text "Yahoo" and the other text ">" in the middle (vertically) I tried "vertical-align: middle" but does not work may someone please help me here. here is my html thanks HTML Code: <div style="width: 100%;"> <table cellspacing="0" cellpadding="0" style="width: 100%;"> <tr style="height: 76px; width: 100%; background-image: url('rep.bmp'); background-repeat: repeat-x;"> <td> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.yahoo.com"> <img style="" src="y.bmp" />Yahoo!</a> </td> <td align="right"> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.yahoo.com"> ></a> </td> </tr> <tr style="height: 76px; width: 100%; background-image: url('rep.bmp'); background-repeat: repeat-x;"> <td> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.google.com"> <img src="g.bmp" />Google</a> </td> <td align="right"> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.google.com"> ></a> </td> </tr> </table> </div> I have my Introduction with the title and all. Then i want my href links on the left side of the picture. However i can't seem to be able to do it.(this is a type of autobiographical site for web design, i am making it as a joke to the current assignment. HOWEVER my teacher isn't able to assist me with this...) Ok here is my code <html> <head> <title>A web site about nothing but video games</title> </head> <body> <h1 align="Center">Chairman of the world</h1> <h4 align="center">This is a site dedicated to Chairman Tide Oo</h4> <hr noshade="1"> <center> <img align="middle" src="http://www.dimensionsguide.com/wp-content/uploads/2009/11/Orange.jpg"> </center> <a href="_" >Link 1</a> <p>Yes and yes</p> <a href="_">Link 2</a> <p>Why not </p> <a href="_">Link 3</a> <p>Why yes </p> <a href="_">Link 4</a> <p>Ye...no?</p> <a href="_">Link 5</a> <p>YES!</p> <hr noshade="1"> </body> </html> Thank you~ Hi, I have a problem. I don't get my table in the middle of the page. can someone help me? <removed by me> Got it now, delete this topic please Hi guys, I'm really having a problem here. I'm creating a new instant messenger program and can't get the tables to stretch properly. Firstoff, when the messenger loads, you will not see the address bar, status bar, menu bar, etc. I want to be able to resize the browser (messenger) window to any size, just like you would with msn for example. I have 3 tables. 1) The first one will contain all the header graphics etc and I want this table to stay aligned to the TOP of the browser window. 2) The middle table is where the chat conversation text will go. The chat text will be aligned to the top of this window. This is the window that I need to stretch to vertically automatically when you resize the browser window. 3) The last table is where the message entry box will be. I want this to stay aligned to the BOTTOM of the browser window. Right now, my MAIN TABLE which contains all of the messenger content does stretch to fit the screen, but how the heck do I get the three tables inside it to be aligned how i need them??? Here is the basic code that I'm working with: <html> <head> <title>Site Title</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <table id="fullheight" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="100%">Header goes here - Stays aligned to the top of the browser window</td> </tr> <tr> <td width="100%">Middle chat content - automatically stretches vertically when the browser window is resized</td> </tr> <tr> <td width="100%">Message entry box section - stays aligned to the bottom of the browser window</td> </tr> </table> </td> </tr> </table> </body> </html> This is the CSS code that I'm using which makes the MAIN table expand to fit the entire browser window: html, body { margin:0; padding:0; height:100%; border:none } #fullheight{height:100%} Can anyone please help me out? Thanks! how do you make it so the video is displayed in the middle of the browser? (I already got it in the center but I want it in the middle of the browser as well) Thanks. <center> <OBJECT ID="MediaPlayer" WIDTH="100" HEIGHT="100" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"></div></div> <PARAM NAME="FileName" VALUE="http://www.htmlcodetutorial.com/graphics/heart.avi"> <PARAM name="ShowControls" VALUE="false"> <param name="ShowStatusBar" value="false"> <PARAM name="ShowDisplay" VALUE="false"> <PARAM name="autostart" VALUE="true"> <EMBED TYPE="application/x-mplayer2" SRC="http://www.htmlcodetutorial.com/graphics/heart.avi" NAME="MediaPlayer" WIDTH="100" HEIGHT="100" ShowControls="0" ShowStatusBar="0" ShowDisplay="0" autostart="1"> </EMBED>10:00 AM 11/4/2008 </OBJECT> </center> Can someone please tell me how to center an iframe vertically on a page. I am feeling really stupid right now that I can't get it. I've tried a few different things and it's not budging!!!! Please help - thanks! Hey guys! On the site I'm working on, I have made overflow:hidden, scrollbars:none, and body scroll=no. It works fine. But when I press and hold the scroll wheel on my mouse to scroll left and right (Middle Click Scrolling), it actually scrolls. How do I disable middle click scrolling? This is my first post here so I apologize if I've done something wrong. Thank you! EDIT: It also scrolls when I use the arrow keys! Help Help, Can anyone tell me why my website is splitting down the middle. In other words when I scroll down it looks like the left half and right half don't match. It happens on all computers. And, how do I fix it? The url is www.gotobreakingthrough.com Thanks 1st time post and an amatuer with no formal teaching of html. I have placed an image on my web page and i want the text i enter to center itself next to the image. I have used align="Center" or Align="middle" and it does that perfectly for the 1st line of text. The issue is when the text spills over to the next line it goes under the image. I have tried a <br /> after the last word of the lines and that did nothing. How can I get all the lines to be centered? Centered meaning from top to bottom not side to side. Thanks, Cardgunner I'm getting strange characters right in the middle of a word. The character looks like a rectangle with an X in it in my browser Safari. At a PC at a university the character was different, dots, I think. Here is the code for the relavent line: <LI><U> La Primavera: Music for voice, lute, viola da gamba and recorder from the English Renaissance</U> You can listen to the whole CD at Magnatune Records and it is also available <A HREF="luteCD.html#Total running time: 59:22"> <strong> here </strong></A>). Played lute as well as produced and arranged music from the late Renaissance featuring lute songs and instrumentals <BR> <align = 'right'> <a href = "mainpage.htm#Why">Back to Home Page</a> </right> Strange. The characters appear in the preview window for this message but not the window I'm typing in now. If you see the characters, there is no need to visit my page, but here is the link to the page. The troublesome line is at the bottom. http://www9.plala.or.jp/edurbrow/personalhistory.html TIA Hi, I have problem with XHTML CSS vertical align middle. It works with Firefox but not with IE6. Many people has IE6 still so I need to get it to work. HTML Code: <div style="height: 128px;">text</div> How would I middle vertical align the text? HTML Code: <div id="table_small"><div id="table_vm">Special Offer</div></div> HTML Code: #table_small { background-image: url('images/table.jpg'); width: 128px; height: 22px; border: 1px solid #5a5a5a; font-family: Verdana; font-size: 10px; color: #e0e0e0; text-align: center; display: table; } #table_vm { display: table-cell; vertical-align: middle; } First off I want to say that I'm new to this forum. Thanks in advance for the help you can give to a noobie. Here's the "dummy page" I put up: http://www.mrcrepe.com/work.html The table I made in dreamweaver. I put it as 900px wide with 1 row and 2 columns. The border color I made a redish/pinkish color as you can see on the outsides, but how do I make that "separater border" into the same color? Right now it's just that silver line. Thanks in advance. -Brian Hi everyone, I'm trying to work out how to have a left and right side "column" both resize when the window is resized. An example of what I am after is : http://www.news.com.au/heraldsun/0,,,00.html. I played with margin-left and -right but don't think it is quite what I am after. Thanks. Is it possible to just have "no wrapping" on divs? For example if we have a div used for a Wrapper for all of the contents, can we make it just so that the div will extend past the screen's width if it needs to ? |