HTML - Division Text Spacing And Color Problems
Having a problem with divisions, as far as i am aware the contents of a division portrays the length of any division. Correct? Is there any way i can make the division wider to enable me to have space either side of my text?
Thanks CW Similar TutorialsI thought you changed the background color of a division by typing: <div bgcolor = "color"> but that didnt work. So can someone tell me how to do it? So, I am working on a website for the final project for one of my classes, and while it looks fine in Firefox and Safari, there is some funky spacing in my divs/table set up with my inline frame in IE: (I have IE 7, but I would like this to work in all versions as I'm not sure what browser my professor has) http://grandmas.host-ed.net/ in IE, you will see there is a space below the top banner and another one between the footer and the border... how can I get rid of these? Here is my code (image map removed b/c it's long and unneeded for my question) Code: <html> <head> <title>Grandma Mae's Country Naturals</title> </head> <body background="bg.jpg" bgproperties="fixed"> <center> <table Cellpadding="0" Cellspacing="0" border="0"> <tr><td> <div style="border: solid 0 #a34c30; border-left-width:3px; border-right-width:3px; border-top-width:3px; padding-left:0ex padding-right:0ex padding-top:0ex padding-bottom:0ex"> <img src="gcn_nav2.jpg" usemap="#mymap" border="0"> </div></td></tr> <tr><td> <div style="border: solid 0 #a34c30; border-left-width:3px; border-right-width:3px; padding-left:0ex padding-right:0ex padding-top:0ex padding-bottom:0ex"> <IFRAME name="inlineframe" src="home.html" width=854 height=350 frameborder="0"></IFRAME> </div></td></tr> <tr><td> <div style="border: solid 0 #a34c30; border-left-width:3px; border-right-width:3px; border-bottom-width:3px; padding-left:0ex padding-right:0ex padding-bottom:0ex padding-top:0ex"> <img src="footer2.jpg"> </div> </td></tr></table> <font color="FFCC99" size="1" face="Georgia, Times New Roman, Times, serif"><b>This site is not affiliated with Grandma Mae's County Naturals</b></font> </center> </map> </body> </html> It's kind of improvised and I am no html expert so perhaps there is a better way to get the look I was going for? Also, I know there is some extra/unneeded code there, but it's all stuff I added when trying to fix the spacing (and it didn't work) and was too lazy to take away. haha Thanks a ton, Nathalie I'm making a new layout for my website, but I'm having some problems, mostly to do with the changes between Internet Explorer and Mozilla Firefox, the latter of which I use. The web page is he http://www.freewebs.com/elysiumgraph...ayouttest.html My first problem is that, although the HTML I have used allows the page be to centered in Firefox, when shown in Internet Explorer it is moved to the left of the page. Also, with the headers in both the links and content panel (which currently have the words "MAIN" and "TEST PAGE" inside them), despite having used the same amount of page breaks, same sized font and same sized images, the spacing is different. The amount of space also is varied between browsers. Can somebody tell me what I'm doing wrong or how to fix this (and why everybody in the world hasn't converted to Firefox yet... >.>)? Hi! My site finally seems to work fine in IE, but now that I'm checking it with Firefox, it turns out to have many problems. I fixed most of them, but the one that's bugging me is that the main text is lower than it should be. Here are the html and css: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> function popup(mylink, annonces) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, annonces, 'width=600,height=600,scrollbars=yes'); return false; } // </SCRIPT> <TITLE>Duo: balalaika et piano -- Dmitri Nassyrov et Victoria Khramova</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; Charset=Windows-1251"> <META NAME="GENERATOR" CONTENT="Microsoft FrontPage 5.0"> <META NAME="Author" CONTENT="Dmitri Nassyrov"> <META NAME="KeyWords" CONTENT="balalaika, Victoria, Khramova, Dmitri, Nassyrov, concerts, piano, duo, stringsandkeys, douce, soiree, histoire, du, balalaika"> <META NAME="Description" CONTENT="Le duo du balalaïka et du piano: Dmitri Nassyrov et Victoria Khramova, ont un repertoire tres varié: folklorique, classique, jazz, et autres... "> <TITLE>Duo:balalaïka et piano - Dmitri Nassyrov et Victoria Khramova</TITLE> <link rel="stylesheet" type="text/css" href="style.css" /> </HEAD> <div id="container"> <BODY BGCOLOR=beige TEXT="#000000" LINK="#0000FF" VLINK="#7F007F" ALINK="#FF0000" BACKGROUND="../site/img/bcknd.jpg"> <script language="javascript"> var u=13200; var vsbl=0; var l=''; </script> <script type="text/javascript" language=Javascript src="http://h1.hitslog.com/counter.js"></script> <script language="javascript"> document.write('<a href=http://hitslog.com/><img border=0 width=1 height=1 src=http://h1.hitslog.com/hl.php?'+l+'></a>'); </script> <noscript> <a href="http://hitslog.com/"><img border=0 width=1 height=1 src="http://h1.hitslog.com/hl.php?u=13200" alt="MySpace tracker"></a></noscript> <TABLE id="main"> <tR width=720 height=160> <td valign=top width=615 height=160><IMG width=615 height=160 alt="Duo: balalaïka et piano - Dmitri Nassyrov et Victoria Khramova" SRC="HEADER.gif"> </td> <td> <table valign=center width=105 height=75 cellpadding=0> <tr class="lang"> <td class="lang"> <img alt="En Français" border=0 src="../site/img/francaisclik.gif" > </td> </tr> <tr class="lang"> <td class="lang"> <a href="../eng/index.html"><img alt="In English" onmouseover="this.src='../site/img/englishon.gif'" onmouseout="this.src='../site/img/english.gif'" onclick="this.src='../site/img/englishclik.gif'" border=0 src="../site/img/english.gif"></a> </td> </tr> <tr class="lang"> <td class="lang"> <a href="../rus/index.html"><img alt="По-Русски" onmouseover="this.src='../site/img/russianon.gif'" onmouseout="this.src='../site/img/russian.gif'" onclick="this.src='../site/img/russianclik.gif'" border=0 src="../site/img/russian.gif"></a> </td> </tr> <tr width=105 height=85> <td width=105 height=85 align=center> <img alt="Duo: balalaïka et piano - Dmitri Nassyrov et Victoria Khramova" src="sideheader.gif"> </td> </tr> </table> </td> </tR> <TR> <td colspan=2> <table width=720> <tr> <td valign=top> <TABLE valign=top> <TR> <TD class="menu"><A HREF="INDEX.HTML"><img src="bienvenueclik.gif" alt="Bienvenue" border="0"></a></TD> </TR> <TR> <TD class="menu"><A HREF="DUO.HTML"><img src="../img/leduo.gif" alt="Notre duo" onmouseover="this.src='../img/leduoon.gif'" onmouseout="this.src='../img/leduo.gif'" onclick="this.src='../img/leduoclik.gif'" border="0"></A></TD> </TR> <TR> <TD class="menu"><A HREF="concerts.HTML"><img src="../img/concerts.gif" alt="Nos concerts" onmouseover="this.src='../img/concertson.gif'" onmouseout="this.src='../img/concerts.gif'" onclick="this.src='../img/concertsclik.gif'" border="0"></A></TD> </TR> <TR> <TD class="menu"><A HREF="audio.HTML"><img src="../img/audio.gif" alt="Notre musique" onmouseover="this.src='../img/audioon.gif'" onmouseout="this.src='../img/audio.gif'" onclick="this.src='../img/audioclik.gif'"border="0"></A></TD> </TR> <TR> <TD class="menu"><A HREF="historique.HTML"><img src="../img/historique.gif" alt="L'Histoire du balalaïka" onmouseover="this.src='../img/historiqueon.gif'" onmouseout="this.src='../img/historique.gif'" onclick="this.src='../img/historiqueclik.gif'" border="0"></A></TD> </TR> <TR> <TD class="menu"><A HREF="liens.HTML"><img src="../img/liens.gif" alt="Liens" onmouseover="this.src='../img/lienson.gif'" onmouseout="this.src='../img/liens.gif'" onclick="this.src='../img/liensclik.gif'" border="0"></A></TD> </TR> <TR> <TD class="menu"><A HREF="contact.HTML"><img src="../img/contact.gif" alt="Comment nous rejoindre" onmouseover="this.src='../img/contacton.gif'" onmouseout="this.src='../img/contact.gif'" onclick="this.src='../img/contactclik.gif'" border="0"></A></TD> </TR> </TABLE> </tD> <TD VALIGN=top> <table height=100% width=500 class="text" cellpadding=20> <tr> <td> <!--<marquee id="test" onMouseOver="document.all.test.stop()" onMouseOut="document.all.test.start()" scrollamount="2" scrolldelay="20" width="100%" height="51" behavior="scroll" direction="left"><font face="arial" align=middle><i> <A HREF="annonces3.html" onClick="return popup(this, 'annonces',true)"><b>17 novembre - 20:00</b></A><br> Festival "From Russia With Love"<br> à la bibliothèque publique juive. </i></font></marquee>--> </td> </tr> <tr> <td valign=top><font face="times new roman" size=3><h2>Un duo, c'est indivisible...</h2> <p align=justify>Dans un duo, le rôle de chaque musicien n'est pas seulement de compléter son partenaire, mais aussi de souligner la sonorité de son instrument.</p> <p align=justify>Notre duo est assez particulier et assez unique à Montréal. Les deux instruments composant notre duo sont: le piano et le balalaïka - instrument folklorique russe. Les possibilitées de cette union sont surprenantes, dans le répertoi folklore, classique, jazz...</p> <hr width=95%></hr> <p>Sur ce site, vous trouverez de l'information sur nos <A HREF="concerts.HTML">concerts</A>, vous pourrez écouter nos <A HREF="audio.HTML">enregistrements</A>, lire nos <A HREF="DUO.HTML">biographies</A>, et plus encore.</p> <p>Et, bien sûr, nous serons heureux de vous voir à nos concerts!</P> <p><i>Dmitri Nassyrov et Victoria Khramova</i></p> </TD> </tr> </table> </td> </tr> </table> </td> </TR> </TABLE> <font face="arial" size=1 align=right> &nb sp; &nb sp; &nb sp; Dmitri Nassyrov et Victoria Khramova © Tous droits réservés.</font> </BODY> </div> </HTML> HTML Code: body { text-align: center; background-color: rgb(239,197,137); background-attachment: scroll; background-position: center; background-image: url("bkg.jpg"); background-repeat: repeat-y; } #container { margin: 0 auto; text-align: left; position:relative; width:720px; } div.text { background-image: url("../site/img/textbcknd.jpg"); } #main { border:0px; /* border="0" */ border-collapse:collapse; /* cellspacing="0" */ } #top { border:0px; /* border="0" */ border-collapse:collapse; /* cellspacing="0" */ } tr.lang { horizontal-align:left; width:100px; height:25px; } td.lang { horizontal-align:left; width:100px; height:25px; } td.menu { width:220; height:40; } table { border-collapse:collapse; } table.text { padding:20px; background-image: url("../site/img/textbcknd.jpg"); } Any help is appreciated. Thank you very much! I am getting ready to create an external css, but want to get the styling issues resolved first with on-page styles. Problem: hr vertical spacing looks OK in Firefox, Opera and Safari, but it is far too much in IE. I am using the following to style a 1 px hr with a specified color: hr.red {border: none 0; border-top: 1px solid #ffffff; border-bottom: 1px solid #990000; width: 100%; height: 2px; margin: 0; margin-top:4pt; margin-bottom:4pt; text-align: center; } Q. Is this the proper way to specify an hr? (The color, thickness and position are fine.) Q. This works with background of ffffff. How do I get this hr to work with any color background? Q. What can I do to keep the spacing the same in Firefox, Opera and Safari, but reduce it in IE? (Do I substitute padding for margin?) Here is the page I where I use the code: http://www.iaps.com/test/standard-te...-hr-test2.html Many thanks in advance. Hello, I have a table text spacing problem. I'm trying to have two text elements (p's, spans's, whatever) stacked vertically or as close as possible underneath one of other. I cannot for the life of me remove the gap in between. I've tried margins, padding, cellpadding/cellspacing, border-collapse, and still, nothing works. I've attached an example using primitive HTML. Anyone have any ideas? The code: Code: <table width="650" border="0" cellspacing="0" cellpadding="0"> <tr> <td>TEXT</td> </tr> <tr> <td>TEXT2</td> </tr> </table> Thanks! Edit: Line-height did the trick. hi i am new to HTML, but a quick learner. i am really stuck though.....i am trying to change the font and size on a simple paragraph on my website.....here is the HTML i put in <p align=center> <font size="4" face="century gothic" > ********** my text ********* l</font> but now the lines in the paragraph are really squished together vertically......is there a HTML code i am missing to add in here is a link to see what it looks like.....http://www.cocosshoppe.com/store/eco...?idCategory=76 Please find it in your really smart hearts to help me ;J i want to space out my text a bit more, i think it's too close together but i dont' know how to fix it, please help! http://leilanimunter.com/news.htm THANK YOU!!! I am designing a site that uses a size-specific template, therefore, the size cannot change vertically so I have utilized a scroll bar in my body text. <table height="340" cellpadding="0" cellspacing="0" style="width:400px;"> <tr> <td><div style="overflow:auto; height:340px; cellpadding:0; width:519px"> body text goes here The scrollbar works fine, but the text butts up right against it. Changing the cellpadding does not give me space between the text and scrollbar, just between the table edge and the scrollbar. [the scrollbar fits inside the table size]. Is there a way to insert extra space between the right side of the text and scrollbar? Thank you for your help! Staci Hi, I have a site that goes over about 3 pages in length and in the IE the page is longer than in firefox. This is really annoying when you have next to the page a sidebar that is supposed to have the same length as the page but in the IE the sidebar does not reach the end of the page (because the page is longer due to larger spacing). To me it seems that IE makes more spaces between the text lines like h1, h2, p, etc. Is this a common problem and is there any solution to this? I'm having trouble trying to resolve a minor issue with the color scheme for the text links of my web site. There are text-based links in more than one part of the site, and these links are set against different colors (tan, white, and green). Setting the link colors inside the body tag (alink= vlink= link=) didn't go well because, the color scheme that works for the green background didn't work for other areas of the site. I'm sure there's a simple answer to this, and I'll welcome any assistance. And I'll be happy to provide any additional information if needed. Hello friends, I am making a login page which takes 2 fields:- 1) user name 2)password Now I want these 2 fields to be colored yellow or blue in the background just like how "gmail" appears to us. Can you please tell me how to change the color inside the textbox from white to any other color. If possible can you please give me a sample code....... So, I wanted to insert text in an image, it worked. PHP Code: .background-image { z-index: -1; } .overlay-text { position: absolute; top: 160px; left: 180px; } PHP Code: <img src="UNDERPART.png" class="UNDERPART.png" /> <p class="overlay-text">HOJ HAAJ HOI HI HOEI DOEJ</p> But now I would like to know how I can change the color of this text, regular stuff doesnt work? I have googled and googled and i still can find this simple question. I wanna know how to make text color boxes. So for example like.. what im talking about is like. picture just inverting a box around a word. so its a black box around in and white text inside. I wanna know how alter the text color and the box color. thx again. So, I tried to use CSS to make my background text black. It hasn't worked... not quite sure why. Here is the site again: Thesoulofashark.com Cheers Hello, I need help with the following, Please see this script first: <a href="here.html" title="www.hereiam.com"></a> Now my question is, how do i change the color of the "hereiam" into RED in the tittle? Hope someown understand and can help me! Thanks! Using CSS, the heading at the top of the page is: h2 class="title">text</h2> That line is supposed to give me text of a certain size and color and a certain number of spaces above and below it - However, when combined with <a href="workshops.html#Name">hyperlink text</a> and <center>same hyperlink text</center> in any combination, the best I can hope for is the correct font size that comes out white (it's supposed to be blue) - I am a monkey when it comes to this - I just copy what somebody else did on the site - but am now at a loss - because copying it is not making it happen - Any help you can give me will be greatly appreciated. So I've got this site, www.jackfrankfurter.com/urbanarch.html and I've got a navigation bar across the top. When you first get to the site, the rollovers work fine but once each page has been visited, the text changes to the "visited" color and the rollover color stops working. Is there something I'm doing wrong in my style page? It looks like this: @charset "UTF-8"; /* CSS Document */ body {background:#000000; color:#666666; font-family:Arial, Helvetica, sans-serif;} a:link {color:#CCCCCC; text-decoration:none;} a:hover {color:#71CEEA;} a:visited {text-decoration:none; color:#F96;} img {border:1px #C5DC79;} .thumbnumber {color:#666666; font-family:Arial, Helvetica, sans-serif; font-size:10px;} Thank you for all your help. It is most appreciated. Yours, Gidmeister Hello, I'm trying to change the text color within a <li> tag in order to display a red "*Updated*" text since we have updated step 3 and want the user to notice it. I've tried using div but it ends up putting the text after "Updated" on a new line instead of on the same line like I want it. Thank you for any help! Code: div.u1{ font-size:12px; color:red; } Code: <ol> <li>Enter your address in the box below</li> <li>Please check location</li> <li> <div class ="u1">*Updated*</div>For more info...</li> </ol> Okay, I can't remember what they're called, but the vertical lines that are often used to separate links... I've got CSS defining the color of my text, but these lines remain unchanged in the same section. How can I fix this? Here's the CSS: Code: a.linksBot { color: #c0c0c8; text-decoration: underline; } And the HTML: Code: <div class="linksBot"> <p class="linksBot"><a href="index.html">Home</a> | <a href="music.html">Music</a> | <a href="video.html">Video</a> | <a href="contact.html">Contact</a></p> </div> |