HTML - Using Simple Styles (to Right Align Text)
ok, so I'm taking a course in college and the question came up... basically, if I do this
[p style = "text-align: right"][h3]Information[/h3][/p] It won't apply the right justifictation, though if I put the justification setting in the h3 tag it does it, or if I switch the h3 to the outside and put the style on it, it works as well. Does anyone know why this is? My guess was that the h3 resets the text's formatting properties and then formats it? Sorry, I'm a newbie Similar TutorialsHow come this code: <img src="tick.gif" alt="+" width="15" height="15" />This is a test, etc. ...puts the image on one line, with the text "This is a test, etc." beneath it? I want the text to be on the same line as the image. (Prob. occurs with IE and FF.) Any ideas? Cheers, James Hello, I was wondering how I could move the cel text from a table to the top. I used: align="top" however this doesn't seems to work for me. sample: http://www.filemirrors.info/new2/ind...&search=Search As you can see I would like to display the search results on top of the page. (currently being displayed in the middle of the page) Can somebody advice me how to do this ? Thanks in advance All I want is to have my image placed in the center of my web page... Every code I try doesn't work. The image is either at the top of the page or it doesn't stay in the center at different resolutions. Can someone help me? Hi there I'm pretty new to HTML, and am really stuck, and if anyone could point me in the right direction that would be awesome! I am trying align text on the left and right sides on the same line, and in between two single boarder lines (top and bottom). I have read up that using a float works which it has, but I am having trouble getting it to sit in between two lines that I have created and in the correct formatting. Below is my code and you should see what I mean...the text is currently sitting unformatted, and underneath the two lines, rather than formatted and inbetween the two lines. Any pointers would be appreciated Thanks, J </tr> </tbody></table> <table border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td style="padding-left: 40px;" width="610"><p style="border-top: 1px solid rgb(186, 186, 186); border-bottom: 1px solid rgb(186, 186, 186); padding-top: 4px; padding-bottom: 4px; font-family: Arial,Helvetica,sans-serif; font-size: 70%; color: rgb(130, 130, 130);"> <div style="float:left">TEXT HERE</div><div style="float:right">TEXT HERE</div></p></td> </tr> 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 there, I am trying to align the text of a drop down box , so that it appears in the centre across all browsers. In the code below I have sucessfully indented the text from the left by 5px and sucessfully aligned it in the centre (vertically) However as I ahve used padding-top, it has also affected the drop down icon (v). Is there a way to align the text in the drop down without the drop down icon being affected across IE7, 8 , FF, and chrome ? I have tried adding line-height to the text and that doesnt work either. Thanks for your help HTML Code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Text align center</title> <style type="text/css"> #selection { color: #999999; display: block; font-family: Arial; font-size: 11px; height: 24px; padding: 0; width: 382px; line-height:20px; padding-left:5px; } </style> </head> <body> <select id="selection"> <option value="0">Selection 1</option> <option value="1">Selection 2</option> <option value="2">Selection 3</option> <option value="3">Selection 4</option> <option value="4">Selection 5</option> </select> </body> </html> I wanted to create 2 tables side by side with each other to form 2 columns. What I did was nested 2 tables into 1 table. However when I did this the text of one table is aligned halfway down the column. I tried aligning it to the top but it just stays there. Any idea what the issue is here. I have attached a picture and the source code to show what's going on here. Any help is much appreciated. Jesse I'm just getting into making pages again, after 3 years off I'm REALLY rusty! Here is the code: <div align="center"> <table border="0" width="635" height="490" cellspacing="0" cellpadding="0"> <tr> <td height="43" width="635"> <img border="0" src="AURORENOVA.jpg" width="640" height="168"></td> </tr> <tr> <td height="322" width="635"> <h1>Monday January 22nd 2007</h1> <p>So here is the first update.</p> </td> </tr> </table> </div> I just want to know how I can align the text in the cell to the top of the cell instead of having it hovering in the center. When I do add more text the position changes, but I just want it all to align to the top. Thanks. Hello HTML experts; a nooby here. Searched for this and found tons of posts but none seemed to fit my question or fix my problem. To show what I am trying to do, I put all the details he http://www.sticksite.com/align/ Is there a solution that a nooby can understand? THANKS for your time! Why doesn't this work? I'm trying color the text green and center it. <h1 style="color: green" style="text-align=center">Some Text</h1> It works when I use the deprecated attribute align. <h1 style="color: green" align="center">Some Text</h1> It works when I do either one or the other. Either just coloring the text or just centering the text. It also works when I use div tags. Is it necessary to use the div tags? I'd like to be able to do both without using the deprecated attribute. I must be overlooking something. Appreciate any help! Thanks. this is SO easy - except for me.. how do i align this image to the top of the page - i am using CSS for the text but not for the image by the way.. thanks for your help.. sandy http://www.thebollocks.org/drop/rugged/taylor.html 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 Hi everyone Let me first say how awesome it is for the web to have a place like this where other html coders can relate. I've been lurking here for a couple months and now I come in with a bang, ha, yes a question. Nonetheless...I'm very greatful to be here. So onto my question.. I'm an assistant on a web design project and I'm having trouble aligning text on a website. I used divs on a WYSIWYG editor to place the text and when I opened the page everything looked fine, of course that was because it was done on this computers resolution specs. Now if you look you will see that when you are either: A) On a different resolution on another computer the text look ambiguous and doesn't align propery B) Minimizing the window or changing its shape the text also doesn't align. So my question is, how do I resolve this matter. Any html pro's or programmers in whatever arena would be truly appreciated in taking a look at this issue for me. Oh and about styles..I don't know much about css as I'm still a beginner and I'm thinking I can't even use styles since I already have that <style> code in there already, but it's not a css one. So I've written that off. Here is the website so you can see the issue (assuming you're not on 1280 for your width in resolution and not in full screen). URL - http://blendsphere.com/mailconnect/ Once at the site you can pull up the html code to see it too. Again thanks for any support or solutions on this. I am relatively new to the web design world so if you do have any solutions if you could make it brief that would be fantatstic. Ok thanks again. Please enlighten this noob, so far I've been enjoying html and hope to do so for much longer. I've kept up with things and it's no surprise that after all these years HTML is still so damned popular. Alright then. Hi I'm still a newbie to HTML coding hence i would most appreciate your assistance. I'm writing a few articles for my site and making use of images in my pieces. However, i'm having alot of problems aligning the caption just right in the middle under the image. I would also like to add a hyperlink to the caption to open in a new window. I've tried numerous tutorials on the web but still cant get it. Would most appreciate some advice. Thank you Hi I have a php form on the contact section of my website. It has a Name, Email and Message Box My Problem is in the message box i have made it quite large so they can type in what they need. But the blinking line to show where the start of the text is is in the centre of the box. How can I align this to the top left? Many Thanks Hi All As the thread title suggests, I'm trying to vertical-align the text in a submit button - see attached. The html and css I'm using is below. I've tried wrapping spans around the value and altering the padding (which looks better but makes the onclick outline appear half-way up the button). Help would be very much appreciated. Thanks, Steve The html is Code: print("<input class='mybtn' SIZE='5' type='submit' name='storedatabase' value='Store Database'>"); The CSS is Code: .mybtn { width: 120px; height: 21px; border-style: outset; border-color: red; font-size: 12px; color: #000000; background-color: rgb(250, 240, 230); border: 1px 1px 1px 1px; outline: 10px; text-align: center; } Hi, I was hoping someone could work out why when i assign text-align:right to a col element it doesn't align all the text in that column to the right. I've called the column col1, and in the css have put col1 { text-align:right }. Any ideas why this doesn't work? The text-align:right does work if put it straight into all of the td's within that column. Thanks, Matthew Millar hi i'm new to htm, infact new to making websites at all. i spent ages writting an intoduction, but some one deleted it. i have started writting my first HTML page : http://normington.superfreehost.org/...age%204.1.html so far it's just some embeded movies from youtube. my first problem is that i want to align text to the left of the video and centered vertically. my second problem is that when i view the page source through mozilla i find some extra text that i cant see if i view the page in wordpad. "<!-- Paste this code into the body section, not the head section of the page --> <script type="text/javascript"><!-- ch_client = "b0redum"; ch_non_contextual = 0; ch_keywords = "tech,free"; ch_linkStyle= "style3"; //--></script> <script src="http://scripts.chitika.net/static/linx/chitika_linx.v3.js" type="text/javascript"> </script> <div id="PaypopupStartCode" style="display:none"> </div> <script language="JavaScript1.1"> if (typeof(paypopupScriptStart) == 'undefined') {var paypopupScriptStart = false;} if (!paypopupScriptStart) { document.write(unescape("%3Cscript")+' src="http://www.bu520.com/popup.php?'+(new Date()).getTime()+'&id=azzamartin&pop=enter&t=1&subid=107931&blk=1&fc=-1"'+unescape("%3E%3C/script%3E")); paypopupScriptStart = true; } </script> <noscript> </noscript>" what does this text do, and how do i move it? any advice about my page would be apprichiated, items to add etc, the next thing i want to do is make a comments page. is this an easy thing? thanks for your help, Normington. Hi All, I'm working on http://www.thesuccessleague.com/hbbtsstart.php and I'm trying to get the red text box on the left (with the picture of a woman) at the very top. I'm sure there's a cleaner way to do it (I'm not an expert at div tags yet), so I put the text box in a table and put that table in another table (as you can see in the code). What code do I have to use to anchor that red text box to the top of that left column? Do I need to use div tags? And if so, how do I anchor it to the table (and not to specific coordinates measurade against the top and left margins)> Thanks for your help! I have ran into a block in my design.... I need a simple script that basicly says, ((User)) ((submit)) and if the user types "john" into the user box and clicks submit redirects to john.html If user types "mary" into the user box and clicks submit it redirect to mary.html Get it? If someone could build me a simple script like 10 users. Thank you, Nexx |