HTML - Text In Div Not Centering Properly In Safari
I don't know if this should really go in the css forum or here, but here it is. The page in question is at the following link:
http://www.sikaband.com/archives/new/index.html and the css file being referenced is: http://www.sikaband.com/archives/new/blackstyle.css Viewing the page in Firefox, the links in the navigation bar are centered the way they ought to be. Safari for some reason shunts the text off to the right a good ways. When I put a visible border on the div in question, I can see that the div itself is aligned properly, it's just the text inside that's off. I'm confused. Similar TutorialsI've spent almost a week designing, coding and uploading this site. Only to have it not display properly in firefox or safari. I've included a link to the site and several screenshots as well as the source code. Please help! This image shows it as it is int ie 7 on windows xp http://img.photobucket.com/albums/v6...asintended.jpg this image shows it on safari and fire fox: http://img.photobucket.com/albums/v6...art/safari.jpg website link: www.tavasystems.com Thanks in advance. It works great in Firefox, IE, and even on my iPhone (Safari), but it's having problems in Chrome and on my friend's Mac (Safari). I have a form with 2 tables inside. The first table is aligned left at 47% of the width. The second table is aligned right at 47% of the width. It should look like this: But instead looks like this in Chrome and Safari...it appears that it's centering both tables instead of aligning them left and right to give 2 separate columns. Any ideas? Here is some of my stripped down code: ----------------------------------- <div id="FormLayer" style="position:absolute; width:680px; height:455px; z-index:3; left: 65px; top: 330px; border:0"> <form action="form.php" method="post" name="orderform" id="orderform"> <input type="hidden" name="recipients" value="email.com"> <input type="hidden" name="required" value="actor:Actor's Name, email:Your Email=confirm:The emails you entered did not match, show:Name of the Show, episode:Your Episode|date:Air Date, character: Character's Name, description: Description of Scenes"> <input type="hidden" name="good_url" value="success.htm"> <table width="47%" align="left" border="0" cellspacing="0" cellpadding="5"> <tr> <td><div align="left" class="style3"> <label for="actor"><span class="style2"> Actor's Name:</span></label> </div> </td> </tr> <tr> <td><input name="actor" type="text" id="actor" size="40" maxlength="50"></td> </tr> <table width="47%" align="right" border="0" cellspacing="0" cellpadding="5"> <tr> <td><div align="left" class="style3"> <label for="character"><span class="style2"> Character's Name:</span></label> </div> </td> </tr> <tr> <td><input name="character" type="text" id="character" size="40" maxlength="50"></td> </tr> </table> </form> The title says it all, my site just doesn't properly work in safari. heres the link www.royaltee-design.com help would really be appreciated thanks Im hoping someone can help me out on this one im just getting back into coding so im a little rusty but i am somewhat stumped by this issue i have a table that the text refuses to align to top middle unless its divided up into a new cell. The best it will do is align middle left of the cell but refuses to go to the top. The site that it is on with the issue is www.gamersjoy.com the table in question is the center table with updates, as you can see everything is pushed halfway down and aligned to the left Any help would be greatly appreciated as it is slowing me down from finishing my project thanks in advance Tcanuth I have three user input text boxes called; "name", "email" and "phone" and one text field to display that information called; "feedback". When a "Submit" button is clicked, the three text boxes are validated to check that what was typed inside them was OK. I then want to display the Users' name, email and phone number on individual lines in the text field, for example, name on line 1, email on line 2 and phone number on line 3. At the minute when I submit the information only the phone number displays on the first line of the text box. In the text field "feedback"; I know the HTML probably interprets my code as; the name is being replaced by the email and then the email is being replaced by the phone number. Here is the relevant section of my code. function validate(){ if (validateName () && validateEmail() && validateformatNumber()){ var myName=document.survey.visitor.value; document.survey.feedback.value=myName; var myEmail=document.survey.email.value; document.survey.feedback.value=myEmail; var myPhone=document.survey.phone.value; document.survey.feedback.value=myPhone; return true; }else{ return false; }} I think the solution could be something simple but I haven't much of an idea of how to do it. Thanks in advance. I'm trying to make a sidebar to navigate through the website and basically lays out the entire site on the sidebar (which is a tree with nodes and leafs etc), but when it tries to display the text, it gets really squished up on the right side, but there are still horizontal scrollbars -.- This is the html after all the PHP stuff: Edit: I put in "width:100em;" in the li section of css. It formatted the text properly, but then the scrollbar continues on forever. Is there any way to find out how many pixels are needed to format the text properly? More specifically, is there any way (javascript, php) to find the length of a string in pixels? HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div#navigation").height(window.innerHeight-16); }); </script> <!--<link type="text/css" rel="stylesheet" href="Styles.css" />--> <style type="text/css"> #navigation { position:absolute; width:25%; height:500px; background-color:#C0C0C0; margin:0px; border:0px; padding:0px; float:left; overflow:scroll; overflow-x:scroll; overflow-y:scroll; } #main { width:75%; height:100%; } li { overflow:visible; } </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled</title> </head> <!--Use a tree for this--> <div id="navigation" > <ul><li>FoodFoodFoodFoodFoodFoodFoodFoodFoodFoodFoodFoodFo</li> <ul><li>FruitFruitFruitFruitFruitFruitFruitFruitFruitFruit (Level 2)</li> <ul><li>RedRedRedRedRedRedRedRedRedRedRedRedRedRedRedRedRe (Level 3)</li> <ul><li>CherryCherryCherryCherryCherryCherryCherryCherryCh (Level 4)</li> <li>StrawberryStrawberryStrawberryStrawberryStrawberry (Level 4)</li> <ul><li>Uber BerryUber BerryUber BerryUber BerryUber Berry (Level 5)</li> <ul><li>Extreme StrawberryExtreme StrawberryExtreme Strawb (Level 6)</li> <ul><li>WOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWOWWO (Level 7)</li> <ul><li>supercalifragilisticexpialadocioussupercalifragi i (Level 8)</li> </ul></ul></ul></ul></ul><li>YellowYellowYellowYellowYellowYellowYellowYellowYe (Level 3)</li> <ul><li>BananaBananaBananaBananaBananaBananaBananaBananaBa (Level 4)</li> </ul></ul><li>MeatMeatMeatMeatMeatMeatMeatMeatMeatMeatMeatMeatMe (Level 2)</li> <ul><li>BeefBeefBeefBeefBeefBeefBeefBeefBeefBeefBeefBeefBe (Level 3)</li> <li>PorkPorkPorkPorkPorkPorkPorkPorkPorkPorkPorkPorkPo (Level 3)</li> </ul></ul></ul></div> </html> I have a mobile application and the text is top aligned in the Blue division rather than centered: <div class="header"> <span style="">TREO 600 LITIGATION</span> </div> Not sure what to put in the Span tag. .header { height: 2.0em; background-color: blue; text-align: center; color: white; font-weight: bold; } And I am viewing this as a Mobile application on an iPhone. Todd Hello chaps, I have a .php page and for some unknown reason the text will not centre itself in each of the cells. It's centred in the horizontal aspect, but vertically it always starts at the top. I thought that one only had to use the align="centre" tag when declaring the table. Interestingly if I convert the .php to .htm then the text does centre itself. What am I missing! Cheers etala Im trying to center and justifty text on my website and really stuggling with it. Any help is appreicated!! Thanks Dave I am trying to create a page header that has an image on the left and text that should be centered, however the centering takes into consideration the image. I would like the centering to use the full width. Can this be done? http://www.toddcary.com/pvrc/test1/header.html I have a web page that I had to convert from a .psd file to an html and I'm not able to center a submit button and the text field next to it. I've tried various alignments but I'm also limited by what I can do because when you convert from .psd to html the entire page is one form. I don't have an external link but I'm able to provide html if necessary. Can someone please take a look at my code and offer some suggestions? Thank you Doug Hi. I can't figure out how to have all the tables on my site aligned to the centre yet have the text in them aligned to the left. In other words I want 2 margins either side of the central body of my site. How can I do this? Thanks. http://goldenworldgoods.awardspace.com/ Hello again, I did this site in Dreamweaver, looked fine in my dreamweaver editor, uploaded it and voila everything goes nuts. List of Problems: The Links are not positioned properly, not big enough plus the drop downs to the bottom and not to the right. That was properly my fault since I just copied a suckerfish method... But can someone help with this. If you study the News Header in the CSS, it says it has a background image, how ever it doesn't show when I uploaded it. I know the url and the pic is correct cause it worked in Dreamweaver... The background for "welcome" is all the way up there which isn't supposed to happen, it supposed to be right on top of the Hello text but that isn't happening either. The hello and welcome are supposed to be aligned to the left of the right header. Thats about it, please can someone help me. I've changed the format of this like 3 times just to get it correctly done, but nothings working. Thank you And don't worry I got it all validated and what not could someone have a look at a site that I am working on... http://benjaminpotter.org/stpauls/ and tell me how come in IE the picture box moves off to the right... it has stumped me! hey anyone who's reading this.. i'm having trouble with fleshing out a vertical menu as when i do, it either doesn't work or doesn't work the way that i had imagined. any help? trying to make submenus that shift down the other main menus from the main menu it originated from. font style won't attach; i used ideoma_SPRAY.otf for the entirety of it and both the html and css are separated in the one txt file. wasn't sure if i was supposed to post this to html or css so i'm just putting it up here for now. thank you! hey everyone...I saw that you helped hasanoca,so I need same help.My site works in Safari,GGL Chrome and opera,but IE and mozilla won't open it right...everything is mixed up...so here is my site: Quote: *{ margin:0px auto; padding:0px; } body{ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#FFD68F; text-align:justify; background:url(../images/bg.JPG) left top repeat; } b{ color:#fff; text-decoration:underline; } strong{ color:#FEE9C4;} h1{ font-size:21px; font-weight:bold; color:#fff; margin:0px; padding:0px; } .clear{ clear:both; margin:0px; padding:0px; } .conten_area{ width:803px; margin:0px auto; padding:0px 0px 0px 200px; } .sub_menu{ width:150px; float:right; margin:0px; padding:35px 0px 7px 0px; font-weight:bold; } .sub_menu a{ text-decoration:none; color:#fff; } .sub_menu a:hover{ text-decoration:none; color:#fff; } .sub_menu a.active { color:#f9be58; text-decoration:none; } .workzone{ width:604px; float:left; padding:0px 0px 50px 0px; margin:0px 0px 0px 0px; } .header{ width:237px; float:left; margin:0px 0px 0px 0px; padding:357px 33px 0px 334px; background-image: url(../images/header_img.jpg); background-repeat: no-repeat; background-position: 0px 0px; } .menu_heading{ text-align:right; margin:0px; padding:0px 0px 0px 0px; } .menu{ width:140px; float:right; font-family:Arial, Helvetica, sans-serif; font-size:18px; font-weight:bold; margin:0px; padding:10px 0px 0px 0px; } .menu ul{ margin:0px; padding:0px; } .menu li{ list-style-type:none; margin:0px; text-align:right; padding:5px 20px 0px 0px; background-image: url(../images/bullet.GIF); background-repeat: no-repeat; background-position: right 10px; } .menu li a{ text-decoration:none; color:#fff; } .menu li a:hover{ text-decoration:none; color:#fff; } /* content master */ .content{ width:556px; float:left; padding:0px 24px 45px 24px; margin:0px; background: url(../images/content_bg.jpg) left bottom no-repeat; } /* welcome */ .welcome{ width:556px; float:left; margin:15px 0px 0px 0px; padding:0px 0px 0px 0px; } .welocme_heading{ width:505px; float:left; font-size:21px; font-weight:bold; color:#7C150A; margin:0px; padding:0px 27px 11px 24px; } .welcome_top{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/welcome_top.jpg); background-repeat: no-repeat; background-position: 0px 0px; } .welcome_content{ width:505px; margin:0px; padding:0px 27px 0px 24px; background-image: url(../images/welcome_bg.jpg); background-repeat: repeat-y; background-position: 0px 0px; text-align:justify; } .welcome_bottom{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/welcome_bottom.jpg); background-repeat: no-repeat; background-position: 0px 0px; } /* services */ .services{ width:556px; float:left; margin:15px 0px 0px 0px; padding:0px 0px 0px 0px; } .services_heading{ width:505px; float:left; font-size:21px; font-weight:bold; color:#000; margin:0px; padding:0px 27px 11px 24px; } .services_top{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/services_top.jpg); background-repeat: no-repeat; background-position: 0px 0px; } .services_content{ width:505px; margin:0px; padding:0px 27px 0px 24px; background-image: url(../images/services_bg.jpg); background-repeat: repeat-y; background-position: 0px 0px; } /* services category */ .web_design{ width:149px; float:left; margin:0px; padding:0px 12px 0px 0px; border-right:1px dotted #FEE9C4; } .web_design_heading{ width:113px; float:left; font-size:11px; font-weight:bold; margin:0px; padding:6px 0px 9px 36px; background-image: url(../images/img.jpg); background-repeat: no-repeat; background-position: left 0px; } .web_design_content{ width:149px; float:left; margin:0px; padding:5px 0px 0px 0px; } /* logo category */ .logo_design{ width:149px; float:left; margin:0px; padding:0px 12px 0px 16px; border-right:1px dotted #FEE9C4; } .logo_design_heading{ width:113px; float:left; font-size:11px; font-weight:bold; margin:0px; padding:6px 0px 9px 36px; background-image: url(../images/img2.jpg); background-repeat: no-repeat; background-position: left 0px; } .logo_design_content{ width:149px; float:left; margin:0px; padding:5px 0px 0px 0px; } /* icon category */ .icon_design{ width:149px; float:left; margin:0px; padding:0px 0px 0px 16px; } .icon_design_heading{ width:113px; float:left; font-size:11px; font-weight:bold; margin:0px; padding:6px 0px 9px 36px; background-image: url(../images/img3.jpg); background-repeat: no-repeat; background-position: left 0px; } .icon_design_content{ width:149px; float:left; margin:0px; padding:5px 0px 0px 0px; } .services_bottom{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/services_bottom.jpg); background-repeat: no-repeat; background-position: 0px 0px; } /* our client */ .our_client{ width:556px; float:left; margin:15px 0px 0px 0px; padding:0px 0px 0px 0px; } .our_client_heading{ width:505px; float:left; margin:0px; font-size:21px; font-weight:bold; color:#7B3903; padding:0px 27px 11px 24px; } .our_client_top{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/client_top.jpg); background-repeat: no-repeat; background-position: 0px 0px; } .our_client_content{ width:298px; height:194px; margin:0px; padding:25px 234px 49px 24px; background-image: url(../images/client_content.gif); background-repeat: repeat-y; background-position: 0px 0px; text-align:justify; } .our_client_list{ width:270px; float:left; margin:0px; padding:10px 0px 0px 0px; } .our_client_list ul{ margin:0px; padding:0px 0px 0px 15px; } .our_client_list li{ list-style-type:disc; margin:0px; padding:4px 0px 0px 0px; } .our_client_list li a{ text-decoration:underline; color:#FFEFD2; } .our_client_list li a:hover{ text-decoration:none; color:#FFEFD2; } .our_client_bottom{ width:556px; height:20px; float:left; margin:0px; padding:0px; background-image: url(../images/client_bottom.jpg); background-repeat: no-repeat; background-position: 0px 0px; } /* footer */ .footer{ width:604x; padding:20px 0px 0px 0px; margin:0px 0px 0px 0px; } .footer_menu{ width:604px; float:left; text-align:center; color:#F3E8D2; text-transform:uppercase; background:#333; } .footer_menu ul { margin:0px; padding:0px; } .footer_menu li { display:inline; list-style-type:none; margin:0px; border-right:1px solid #ffe1ad; padding:0px 5px 0px 5px; } .footer_menu li a{ text-decoration:none; color:#F3E8D2;} .footer_menu li a:hover{ text-decoration:none; color:#F3E8D2;} /* link */ a { color:#ffffff; text-decoration:underline; } a:hover { text-decoration:none; } p a{ text-decoration:none; color:#fff; float:right;} p a:hover{ text-decoration:none; color:#fff; float:right} /* Inside Style Start Here */ .insidebanner { height:332px; background:url(../images/insidebanner.jpg) left top no-repeat; } h5 { font:15px Myriad Pro, Arial, Helvetica, sans-serif; color:#ffffff; font-weight:100; padding:0px 0px 5px 0px; border-bottom:1px dotted #ffffff; margin:0px 0px 10px 0px; } h6 { font:17px Myriad Pro, Arial, Helvetica, sans-serif; color:#ffffff; font-weight:100; padding:0px 0px 5px 0px; margin:0px 0px 10px 0px; } .ourvalue { margin:10px 0px 0px 0px; } .aboutus-img { float:right; border:4px solid #b0a48b; margin:0px 0px 10px 20px; } .aboutcolumnzone { padding:20px 0px 16px 0px; } .aboutcolumn1 { width:48%; float:left; margin:0px 0px 10px 0px; } .aboutcolumn2 { width:48%; float:right; margin:0px 0px 10px 0px; } .abouticon { float:left; margin:0px 20px 0px 0px; } .servicecolumnzone { padding:20px 0px 16px 0px; } .servicecolumn1 { width:48%; float:left; margin:0px 0px 10px 0px; } .servicecolumn2 { width:48%; float:right; margin:0px 0px 10px 0px; } .our-comment { margin:10px 0px 0px 0px; } .blog-posted-row { padding:3px; } .ourprojectrow { margin-bottom:20px; border-bottom:1px dotted #000000; padding-bottom:10px; } .project-img { float:right; margin-left:20px; border: 6px solid #b0a48b; } input.button { color:#ffffff; background:#414141; font:bold 11px Arial, Helvetica, sans-serif; text-decoration:none; padding:10px 10px; margin:0px 5px 5px 0; border:1px solid #000000; } input.button:hover { cursor:pointer; color:#cccccc; } .insidereadmore { padding:10px 0px 10px 0px; } /* Inside Style End Here */ Hello, i have an online radio station that id like to embed into my website... the station is hosted and everything..just want a player that will play the station on demand for people... but i dont know how to do it. I have a m3u, but thats about it at this point any help would be greatly appreciated |