HTML - How Can I Replace The <span> Tags In My Code?
All my code is filled with these <span> tags in my html page, but not all of my code. How can I remove these tags and make a better structured layed out web page. When I remove the <span> tags, I will need an alternative html tag to replace the <span> tag. My <span> tags store stuff about my web page, so I need a html tag that is a replacement and a structured way to put my data in the web page. Any expertise would be great.
Thanks, Chris Similar TutorialsWhat exactly do the Span and Div tags do? I've read definitions on the web: "defines a block of text," etc., but I don't see any examples of what the difference is from normal text to text that is used using the span and div tags. Could someone provide any examples? Thanks, Brad What could be wrong with my html or dreamweaver settings? I have code similar to following: Code: <div id="mydiv"> <span id="myspan"> <p>Some <em>text</em> here</p> <p>Some more text here</p> </span> </div> If I select the word 'text' in Design view and make it not-emphasized/Italics, the code changes to: Code: <div id="mydiv"> <p><span>Some text here</span></p> <span> <p>Some more text here</p> </span> </div> So it's decided to remove the id attribute from the span and move the span inside the paragraphs, and since there's two paragraphs, there's an extra span as well. The result is the same even if the span is outside the div. Even if the code is wrong, why is dreamweaver fixing it when I'm just trying to do something unrelated. (The em tag is not the only one that causes this to happen.) hello, I'm new on this site. I am making a c# app with web surfing in mind. I asked on 3 c# forums about a question I have but I am not satisfied with their answers. So I came to you too. I want to be able to clean a page(get rid of some tags), that is loading in my webBrowser control, before is rendered inside it. i DON'T want to load it into a string, because if I do that, I must remake the page. I need something that can peek at some page,but not consume it, search for some specific tag, replace/delete it, then allow the "new" page to be finally loaded in my browser. How to achieve this, using html or javascrispt or whatever? I can't explain better than that. Thank you. Ok, this is all very new to me. Just messing round trying to get things to work at the moment mainly how to use div and span. So I've set up two pages in notepad one for html and one for css and they look like this. html Quote: <html> <!---Anchor for CSS page---!> <link rel="stylesheet" type="text/css" href="css.css"> <head> </head> <!---Body of page---!> <body> <!---Div tag for centered page margin---!> <div class="one"> <h1><center>THE CIVVIES.</center></h1> <hr> <!---Division for bottom of Heading---!> <div class="two"> <img src="images/civvies.jpg"> </div> <div class="three"> the civvies </div> </body> </div> </html> css Quote: div.one { left: 165px; top: 4px; bottom: 20px; width: 900px; length: 600px; position: absolute; border: 10px solid black; } h.1 { align:center; font-size:150%; font-family: courier; } div.two { left:165px; length:50px; border: 5px solid black; } Div.three { left:600px; right:10px; top:20px; width:200px; border:5px solid black; } Now this all works fine until div three...i've got a simple page title that seperates from the rest, the page centers itself, the picture alligns left under the header and takes up half the page to the bottom basically splitting the remaining space into two. Now on the right hand side i was hoping to be able to put content which is what div three was for unfortunately It doesn't seem to want to go where I'm asking it to. Any chance somebody could pop in here and just give me a right hand side of the page to work with for content? also possibly show me how to insert a navigation table above the picture but after the dividing line between the header and the picture? Like I said I'm very new at this. I'm trying to replace a lot of text before that exists above the following tag <body id="{VALUE}"> in Dreamweaver. I can use the find&replace option to 'add before start of tag' but I want to actually remove the code/text before a certain tag. Does anyone know if this is possible? will I have to go down the regex route? Help would be much appreciated fellas. Thanks in advance! Hello, I tried searching on the internet for my question, but strangely have yet to find anything. Hopefully something will turn up soon - but here is my question in the meantime: I have a webpage that has a flash sequence that you must click on to take you to the rest of the site. But for browsers that don't have flash (like phones), I want that flash sequence to be replaced by some html code - like an image that you can click to take you to the site. I feel like that's a pretty basic question - so if you know the answer, I would really appriciate your help! Thanks!! I'm writing a program that reads an HTML file, then alters text that is viewable by the users. So I don't want to alter the text within a tag. I also don't want to edit the text that is between <script ..> and </script> or between <style ..> and </style> because that defines the way the HTML file works. These are the only two tags I know of that has code between their begin and end tags. Are there any other tags that I need to be concerned with? I would also like to know if the tag list at http://www.w3schools.com/tags/ is a complete list of HTML tags? Thanks you. I am having problems with putting HTML code into an RSS 2.0 description tag. If I escape the HTML using <![CDATA[, the HTML shows up fine when the feed is viewed with Firefox 2.0, IE7, and various feed readers. The problem occurs when browsers like IE6 and Netscape view the .xml feed, as these do not support native RSS. To allow the latter browsers to easily display the feed, I use XSL to transform the XML into something much nicer. However, the escaped HTML shows up as literal characters (code) in the feed when viewed with IE6 and Netscape. How can I show HTML in the description tag of an XML feed using XSL? I also get literal characters when trying entity-encoded HTML. i'm looking for a cheap way out of making collapse/expand code. i've learned a lot of 'ghetto' techniques n thought mayb i can use something similar to the html tricks i've learned in the past. the theory i have is.. i use the title of the collapse/expand text as a link to the text below it to open and close by using the navigating tags: Code: <a name="content">opening/closing text here</a> and the title above the content: Code: <a href="#content">Title</a> to open the area of text. now my idea of a shortcut around the whole css/html/javacript combo is to make the text below it use a Code: <font size=0>content</font> at default and have the href title link change the font size to the default 9pt but I don't know if that's even possible. Is it possible with the Code: <div> tags? and if so, using that, would i still b able to make a link like that? Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags? [/code] <html> <body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey" /><br /> Last name: <input type="text" name="LastName" value="Mouse" /><br /> <input type="submit" value="Submit" /> </form> </body> </html> [/code] Hi, I'd like to ask a newbie question. I've Googled this to death but as always there isn't a single view so I thought I'd ask the experts here. I have a piece of information - it doesn't really matter what it is but it is accompanied by an image. With the increase use of css sprites, I know find myself using background-image to set the image. The overall effect would look like this <image> some text. This needs to go inline and have a fixed height so that the image shows. There are also other bits of information on the same line. Do I make the containing unit a DIV and float it or make it a SPAN and use display:block? I don't particularly wan't to use display:inline on a DIV because it's not supported correctly in IE. What would you do in this case? Thanks John Does anybody know how to get the grab hand image for the onmouseover event for spans? Hi, I have build up a mouseover functionality that shows a light gray boks around the 4 categories on the frontpage on http://www.jjas.dk. It works perfectly under all the browsers except IE6 and IE7. In this browsers I can only click on the text placed right from the picture. But when I try to click on the picture or the picture related text, nothing happens. Now, after I had used 5 days finding a solution I'm giving up. There is nothing wrong with the code at all, so why is it, that it won't work under Internet Explorer? This is the code I'm using: HTML Code: <div class="row"> <ul> <li> <a href="/produkter-og-loesninger/komponenter.aspx"> <span class="picture"> <img src="/media/3899/komponent-teaser.jpg" alt="Agenturprodukter" /> <span class="content"> <strong>Agenturprodukter</strong> <small>Vi er forhandler af flere produkter. </small> </span> </span> <span class="right_content"> <h2>Handelsvarer</h2> <small>Vi forhandler passive og perifere komponenter. Kabinetter, keyboards, displaysystemer m.v.</small> </span> </a> </li> </ul> </div> CSS Code: #top_section .row { float:left; width:948px; } #top_section .row ul { float:left; width:948px; list-style:none } #top_section .row li { float:left; width:474px; } #top_section .row li a { float:left; width:440px; padding:10px; height:145px; text-decoration:none; cursor:pointer; border:1px solid #eeeeee; } #top_section .row li a:hover { float:left; width:440px; height:145px; background:#dddddd; border:1px solid #d3d2d2; } #top_section .row li a .picture { float:left; width:220px; position:relative } #top_section .row li a .picture img { float:left; z-index: -1; } #top_section .row li a .picture .content { float:left; width:210px; background:url(../common/images/picture_content_bg.png) repeat-x 0 0; padding:5px 0 0 10px; position:absolute; bottom:0; left:0; height:41px } #top_section .row li a .picture .content strong { float:left; width:210px; font:bold 12px/14px Verdana, Arial, Helvetica, sans-serif; color:#fff; } #top_section .row li a .picture .content small { float:left; width:210px; font:11px/13px Verdana, Arial, Helvetica, sans-serif; color:#fff; padding:3px 0 5px } #top_section .row li a .right_content { float:left; width:200px; padding-left:20px } #top_section .row li a .right_content h2 { float:left; width:200px; font:bold 18px/20px Arial, Helvetica, sans-serif; color:#336699; } #top_section .row li a .right_content small { float:left; width:200px; font:12px/17px Verdana, Arial, Helvetica, sans-serif; color:#666; padding-top:3px } You can see it live on: http://www.jjas.dk/ (right under the slideshow) I really hope someone out there can help me with my problem. I guess it's pretty easy, though I haven't found the easy part yet Kind regards, Niels Kristiansen Hi, My document contains below span class: <P> <span class="ErrorText"> <img border="0" src="/wps/images/icn_alert_error.gif" class="DialogIcon" align="absmiddle"/>Path does not exists </span> </P> I want to check for existance of this class in document(jsp) using below function: function preview(){ ..... .... ...... (contentPath is textfield) if(contentPath==null || contentPath.length==0){ alert("Please select a content fragment before attempting to preview"); } else { here i want to check whether above mentioned span class exists in document or not if span class exists then proceed for next step.. else break ..... ............... .... } } I'm trying to use the SPAN tag to override a DIV's attributes wherein it is initially TEXT-ALIGN: LEFT;. I thought for sure that I could override it with the SPAN tag but no luck. I'm doing it this way because I want a portion of the content in the DIV to align left and the other to align right. 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> #quote { width: 500px; } #quoteTop { width: 460px; height: 40px; padding: 0 20px; background: url('images/quoteTop.gif'); text-align: left; } #quoteMiddle { width: 460px; padding: 0 20px 20px; background: url('images/quoteMiddle.gif'); text-align: left; } #quoteBottom { width: 460px; height: 80px; padding: 0 20px; background: url('images/quoteBottom.gif'); text-align: left; } </style> </head> <body> <div id="quote"> <div id="quoteTop"> <span style="text-align: right;"><a href="/">top</a></span> </div> <div id="quoteMiddle"> blah blah blah blah blah blah blah <em>blah blah blah</em> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah <strong>blah blah blah</strong> blah blah blah blah blah blah-blah blah—blah blah blah blah blah blah blah blah blah BLAH! blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah </div> <div id="quoteBottom"> J. Doe </div> </div> </body> </html> Is overriding code a bad idea for what I'm trying to get done? Hi Everyone, I am using 'span title' as a means to display a tool tip. Some of the tooltips are quite long and the popup is disappearing before the user would have a chance to read it all. Is there any means to delay the length of time that the tooltip will appear without the user having to hover over the text again. An example of one of these tooltips is below: <span title="As dentistry has advanced beyond basic care into new areas such as implantology, cosmetics, and other treatments of the entire dento-maxillo-facial complex, so too must the diagnostic tools keep pace with the need for a higher quality of general and specific information. Our surgeries are fully equipped with X-ray machines and in-house film processors. This enables our patients to get their diagnosis results instantly and treatment plan drawn up effectively in one visit."> Periapical film (small dental film) </span> I really appreciate any help you could offer? Thanks Cathal Hey guys, so I'm building my script right now and it's going quite well. I used Javascript to capture input from text box and display it later using the <span id=''> command. What I'm trying to do is show the <span id=''> in more than one spot. For whatever reason it won't let me do this, it will only display in one spot and not the other. So to clarify, I used the var bride = document.getElementById('bride').value; document.getElementById('bride2').innerHTML = bride;(sorry for the javascript) and then used span id later to display it which works fine when you only want to display it in one spot. When I go to display it in two spots, I believe the span id tags are getting confused with each other and fighting. Is there any way to fix this? Hi, I have a huge text that i need to display in a span tag on my page. Currently the words are breaking at the end of the line, i.e. if the word if "Understand" and there is not enough space to display the entire word, half of the word is displayed in the space available, and the remaining on the next line. However, i want that the entire word be displayed on the next line. Please suggest how this can be done. Regards, Ankit!! Hi everyone, I was just wondering if it was possible to modify an element from the style tag for example: HTML Code: <style> .homepage { font-family: Arial, Helvetica, sans-serif; font-size: 50px; color: #ffffff;} </style> <span class="homepage">onomotopeia</span> I was wondering if something like this was possible: HTML Code: <% bcolor = "#0000ff" %> <!-- ASP code --> <style> .homepage { font-family: Arial, Helvetica, sans-serif; font-size: 50px; color: #ffffff;} </style> <span class="homepage.color=<%=bcolor%>">onomotopeia</span> So, what I'm trying to do is have the variable called "bcolor" access the color attribute of the .homepage. I know I could have easily changed the color in the style from #ffffff to #0000ff but I want to be more dynamic, does anyone have any suggestions? |