HTML - Help Needed. <img> Tag Causes Automatic Line Breaks.
For some reason whenever I have an img tag it causes an automatic line break. I was wondering if anyone else has encountered this problem.
Basically i'm trying to add an small icon to the left of an active link. So the code basically looks like this.. <img src="icon.jpg"><a href="link.html">text link</a> The end result is a icon on one line and the link rests below it instead of everything being on one line. This is the first time this has ever happened and i'm wondering if this is normal? I realize this may seem like a noob question but any help would be appreciated. Thanks. Similar TutorialsOkay, so here's what I'm trying to do- This is a short excerpt of my page, the part that is causing the problem: HTML Code: <font color=#333333><b>Category: <div id="category" align="left">Category</div></b></font> I want to DISPLAY the Html code on my site, so I'm using < and > to achive this. Its working perfectly. Now, in the code that is being displayed- is an actual HTML code, that I want to turn into html. Here's where the problem is. As you can see- the actual Html code is: HTML Code: <div id="category" align="left">Category</div> I made sure not to change the tags, so that the browser will accept it as html. Now- my problem is that when I publish this on my site, an ugly page break appears before & after the real html code. I want to be able to copy the code that appears, and just simply paste it onto another part of the site- BUT, because of the line break that occurs, the HTML isn't displayed properly. Normally, a simple line break like this one won't affect anything- but I'm using WORDPRESS for my pages, and wordpress recognizes every time a line break happens, it makes a <br> code. So even if you press the enter key in HTML, it automatically ends up being a <br> code and breaks the whole html code. How will I make it so that the line break DOESN"T happen? TL;DR: I want to display HTML code on my site, but I want to have an ACTUAL HTML CODE inside the html code to be displayed. When I do this, a line break happens before and after the ACTUAL HTML CODE. How do I get rid of this? What my page currently looks like: HTML Code: <font color=#333333><b>Category: <div id="category" align="left">Category</div></b></font> Please help, everything is greatly appreciated! Forgive me for this rather elementary question...I'm a T-shirt printer and I've learned enough html to build my own website, but I have a lot more to learn about it...Anyway the problem I'm having is when I add an image and want the next paragrah, or headline to display below the image, I've been accomplishing it by adding line breaks until it appears below rather than off to one side. Sometimes I have to add as many as seven or eight <br />'s to achieve my purpose. Is there a better way to make something appear below an image? I am trying to build a page using drupal CMS but I have a problem. Whenn add checkbox, text and submit button together, each of them gets in a different line. It looks like i use <br> although i don't. Adding content with a WYSIWYG editor seems to be working into the editor content area. But when I save it, it appears again in different lines,no matter in which place of the frontpage I add it. So I guess I guess the reason is the style.css file. But I can't find the exact line that damages my code. In pictures below you can see 1)the content correctly presented into WYSIWYG editor 2)The content in frontpage (awful) 3)The simple html i use 1) http://www.teicrete.gr/libsite/files...wyg_editor.JPG 2) http://www.teicrete.gr/libsite/files...page_error.JPG 3) http://www.teicrete.gr/libsite/files/3_simple_html.JPG Any help would be great... Thanks in advance! hi y'all. my site looks fine in firefox (as usual) but ie is doing something weird. behavior is identical in IE 6 and 7, incidentally. the problem is in the sidebar. see the underlined titles for each section? in IE, a mysterious line break appears above each. what's going on? Hey guys, this may seem as an easy solution but I've been pulling hair over it. How do I get rid of the blank line breaks that appear before and after unordered lists? I attached a picture to this thread of what I am exactly talking about. Thanks in advance! Hi I have the following code loading an external .txt file into a DIV <?php $content = file_get_contents($_SERVER['DOCUMENT_ROOT']."/text_files/about_text.rtf"); echo htmlspecialchars($content); ?> It loads, but the line breaks are ignored, so it appears as one continous string of words. How do I make the html display the text file's line breaks? Thanks for your time and info Shaun Hi, I am new to html, i have a form that i needed to add a line, but when i try to do it in Dreamweaver, the other co-ordinates are getting shifted. If anybody can give me pointers, i'll really appreciate it. Thanks, Ok so I am extremely new to coding and am setting up a small website. Everything I use right now is based off of a few excel spreadsheets and the site I'm making I want some of that info in a more public format rather than sharing a bunch of spreadsheets. One spreadsheet I have imports the html tables from another website and puts it into a google docs spreadsheet. So whenever the source code is changed on the original website it is also changed on my spreadsheet. Now, is it possible to reference a specific spreadsheet cell(s) (instead of the specific data in the cells) so that when the data is changed on the spreadsheet it is also changed on my website. The way I have it now it only shows what was on the spreadsheet at the time the code was entered. So if cell A1 said apples and then a day later cell A1 changed to bananas, my website still shows apples since that was what was originally entered even though the spreadsheet changed to bananas. I'm not sure if I'm too clear on what I'm asking...I tried. If you have a vague answer or a starting point where I should start looking that would be good too. Thanks. hey all, working on some simple coding that is giving me trouble. here is what i have so far: HTML Code: <div style = 'position:absolute; width:auto; background-color:#DFD2FC;padding:10px;'> <div style = 'position:relative; background-color:#B6FCCC;'> <p>pair</p> <div style = 'position:relative; float:left; background-color:#FCE4B6; margin:5px; padding:5px;'> <p style = 'align-text:left'>1<br>2<br>moo<br>meow</p> </div> <div style = 'position:relative; float:left; background-color:#FCE4B6; margin:5px; padding:5px;'> <p style = 'align-text:left'>3<br>4<br>sdf<br>asdf<br>sdf</p> </div> </div> </div> however, it's not behaving correctly. i'd like the 'green' div to change in size according to the text within the 'yellow' divs. and then the 'purple' div should change size compared to the size of the 'green' div. i hope that's clear... any help? i have created a web page using MS front page and i folder nme midi containing 600 midi files and uploaded both at a free web hosting service no i need to know that is there any way that the names of all files in folder MIDI automatically appears on my web page i dont want to type names of files and then create there hyperlinks it may take lot of time i have to submit nearly 2000 files . Hi, this is my first post and I'm pretty new at HTML. Ok, I have been making a script and it works fine, but there's a problem. Most websites I visit (including this one) when you make the window smaller, the stuff you covered up simply goes off screen, but in my script, when you cover it up most stuff shifts down a line and is still visible. This look very messy having things constantly shifting around! : I was wondering if there was some tag or something that causes everything to freeze in place no matter how small the window gets. -Thanks Hi there I use www.webnode.com to build & maintain the website for our children's orchestra. On my website we have a page were every kid's name, photo and age is showed. I was wondering if there was an automatic age changer system code, so I would not have to check every day if there are birthdays and having to change them manually. Something like this; Name, <age>, photo. That age would be calculated by putting in the birth date. Is that possible? Thx in advance! Martino I was wondering if it's possible to automatically copy a file to a website from another site. The reason I ask, is the company I work for wishes to show the newsletters from their partner company but doesn't want to update their website after each letter. So, I know I can create a link to their site rather easily, but I'm wondering if it's possible to actually copy the files that are stored in .pdf format. I'm making an HTML-based text editor for Windows PCs. The editor needs to have some special functions, and one of them is the automatic colouring of certain keywords. Here's the situation. (Apologies if little of the following is relevant, but I can't be sure.) The editor is part of a program. When the user wants to write something, the editor is created (an instance of the Windows WebBrowser) and custom HTML is loaded into it. So it's displaying a spontaneously-created HTML page. This page includes a section marked contenteditable=true, and that's where the user types. When the user is finished writing, they press a button, the current HTML in the browser is read and the text is extracted from it and saved, and the browser is destroyed. All that works fine. However, I'm having trouble building in some special functions. Namely keyword colouring. The host program allows the user to set a number of keywords, and a colour for each one. The idea is that when the user is typing in the editor, keywords will be detected and coloured. This colouring process needs to happen in realtime. As an amateur, I naively thought it would suffice to just read the HTML intermittently, scan for the keywords and add tags to each one, like this: Code: <SPAN style=text-colour:#FF00FF>thekeyword</SPAN> But there are several problems with this method. Every time the HTML is revised and reloaded into the browser, the "page" is scrolled back to the top. (As an aside, if anyone knows a method for getting and setting the caret position in an HTML page, I'd be grateful to know it too!) The second problem is that if the user types in the middle of a keyword, the new text inherits the colour. So obviously the tags method isn't going to be sophisticated enough. What I need is a smart way to detect and recolour keywords on the fly. Some form of syntax highlighting, I suppose. Does anybody know any tricks for doing this? JavaScript perhaps? Below is an example of what I want to achieve. As you can see, the caret is in the middle of a keyword. If the user pressed the spacebar, the editor would immediately look like the second image. What do you think? Is it possible? Thanks for reading, Seymour. Hello. I am quite new to this kind of page work so I am looking for some help. I am trying to have my page show listed items by letter and, with each letter, a number of results per a page. For example. I would like to add "Abacus" to to "A", but "A" has 20 items already. How would I make it so that "Abacus" pushes the list down and a second page is created? I am hoping for a script because I plan to add new items regularly. It would be tedious to manually create a new page and to sort every item down one. How does one enable automatic re-sizing of a web page based of the viewers resolution and browser? Hi, i am sure you's are all familiar with photobucket, well i was wonderig if anyone knows the code to automatically highlight and copy to the clipboard information in a box when it is just simply clicked like it does with the ht code, image url, etc next to your picture on photobucket. thanks, karl Is there a way to automatically login to a website that requires http authentication? I am especially talking about an image that has a src field that contains a protected image. In some browsers, for example, this works: Code: <img src="http://username:password@website.com/image.jpg"> But, this inclusion of the username/password isn't supported by all browsers I've tested it on, nor is it standard. Is there any way to do this in html or javascript? Thanks so much! Hi guys I was hoping someone could help. We have a screen in IT at work and would like to setup a simple webpage which cycles through a number of other webpages showing content. What im trying to find is a simple way to do this but also add a fade out fade in effect. Can anyone help? I need help with a table and tr... I have 3 rows in a table. The first 2 contain the same td(s) - 4 of them. I'd like to have a 3rd row that contains 9 td elements visible. How can I accomplish that? Is it possible to make the third rows td elements independent of the first one (since it follows the layout of the first rows td lengths)? |