CSS - Making Text Display In A Straight Line?
Hello, I've been having trouble with a simple design I have been creating. I was wanting the footer text to display in a straight line, but it's displaying horizontally. Could you please look at my HTML and CSS coding and see if I had made an error:
Code: www.wendyhenrichs.com/huy Thanks! Similar TutorialsHi! Remind me please how to position something straight at the middle of display height? Hi, What is my CSS file is making my <p></p> tags not break a line? My css file is located he Code: /* Theme Name: U5 Theme URI: (URL address blocked: See forum rules) Description: This theme is form <a href="utombox.com">UtomBox.com</a>. Version: 6.11 Author: Utom Author URI: (URL address blocked: See forum rules) */ * { list-style:none; text-decoration:none; margin:0; padding:0; } blockquote { margin-left:15px; background-color:#F8F5D1; border-left:5px solid #F9CA68; border-right:1px solid #F9CA68; border-bottom:1px solid #F9CA68; border-top:1px solid #F9CA68; margin-right:15px; padding:4px; } .navigation { font-family:"Trebuchet MS", Verdana, sans-serif; margin-bottom:5px; font-size:12px; } .navigation a { color:#3E6697; text-decoration:none; } .navigation a:hover { color:#3E6697; text-decoration:underline; } .navigation .alignleft { float:left; } .navigation .alignright { float:right; } .post { margin-right:10px; clear:both; border-bottom:1px dotted #999999; margin-bottom:5px; padding-bottom:10px; margin-top:10px; } .post h1 { font-size:30px; font-family:"Trebuchet MS", Verdana, sans-serif; } .post h1 a { color:#4374b0; text-decoration:none; padding-left:1px; padding-right:1px; } .post h1 a:hover { color:#4374b0; text-decoration:underline; padding-left:1px; padding-right:1px; } .post h2 { font-size:20px; font-family:"Trebuchet MS", Verdana, sans-serif; } .post h2 a { font-size:20px; color:#4374b0; text-decoration:none; padding-right:1px; margin-top:5px; } .post h2 a:hover { font-size:20px; color:#4374b0; text-decoration:underline; padding-right:1px; margin-top:5px; } .post small { font-size:10px; color:#666666; font-family:Verdana, Arial, Helvetica, sans-serif; } .post small a { color:#3E6697; text-decoration:none; } .post small a:hover { text-decoration:underline; } hr { clear:both; border:0px; background-image:url(/images/hor_div.gif); background-repeat:repeat-x; height:1px; background-color:#FFFFFF; padding:0px; } body { overflow:auto; background:#fff; color:#fff; font-size:11px; line-height:22px; font-family: "Verdana", Lucida Grande, Arial, Helvetica, sans-serif; } p { font-size:11px; margin:0; margin-bottom:15px; } p a { color:#333; text-decoration:none; margin:0; margin-bottom:15px; } p a:hover { color:#333; text-decoration:underline; margin:0; margin-bottom:15px; } h1,h2,h3,h4,h5,h6 { font-family:"Trebuchet MS"; } p,.entry ol,.entry ul { margin:0; } .entry ol,.entry ul { padding:0; } .entry strike{ text-decoration:line-through; } input,textarea { background:#fff; border:1px solid #999; font:11px "Verdana", Arial, Helvetica, sans-serif; color:#333; padding:2px; } input[type=text]:focus,textarea:focus { background:#fff; border:1px solid #666; font:11px/150% "Verdana", Arial, Helvetica, sans-serif; color:#333; } #wrapper { background:#fff url("images/bg.png") repeat-y center center; margin:0 auto; padding:0 5px; } #header { height:100px; } #headerimg { height:100px; } #headerimg h1 a { background:transparent url("images/logo.png") no-repeat 0 0; position:absolute; width:180px; height:100px; overflow:hidden; text-indent:400px; line-height:200px; } #headerimg .description { display:none; } #box { padding:0 20px 20px; } #content,#sidebar { float:left; margin:0 20px 0 0; } #content { width:550px; color:#333; } #content2 { width:550px; color:#333; float:left; margin:0 50px 0 0; } .narrowcolumn a { color:#333; text-decoration:underline; margin:0; margin-bottom:15px; } .narrowcolumn ul.u_datetime { background:#666 url("images/datetime.png") no-repeat 0 0; width:60px; height:60px; float:left; text-align:center; color:#FFF; margin:0 10px 0 0; } .narrowcolumn li.u_month { font-size:10px; line-height:20px; } .narrowcolumn li.u_day { font-size:20px; font-weight:700; line-height:20px; } .narrowcolumn li.u_year { font-size:12px; font-weight:700; line-height:20px; } .narrowcolumn h2 a { color:#4374b0; font-size:20px; margin:0; } .narrowcolumn .u_tag,.narrowcolumn ul.u_postinfo li { line-height:23px; margin:0 10px 0 0; padding:0 0 0 20px; } .narrowcolumn .u_tag { background:transparent url("images/tag_blue.png") no-repeat left center; } .narrowcolumn .u_author { background:transparent url("images/user.png") no-repeat left center; } .narrowcolumn .u_timepost { background:transparent url("images/time.png") no-repeat left center; } .narrowcolumn .u_category { background:transparent url("images/folder.png") no-repeat left center; } .narrowcolumn .u_comment { background:transparent url("images/comments.png") no-repeat left center; } .narrowcolumn .entry { clear:both; padding:10px; overflow : hidden; } .narrowcolumn .entry blockquote { border-left:2px solid #fff; color:#666; margin:0 0 0 2em; padding:0 0 0 2em; overflow:hidden; } .narrowcolumn .entry ol li { list-style:decimal; } .narrowcolumn .entry ul li { list-style:disc; } .narrowcolumn .entry img { margin:5px; } .narrowcolumn .entry a:hover img { border:0px solid #FFF; } .narrowcolumn .navigation { height:20px; margin:0 0 20px; } .narrowcolumn .navigation_page a,.narrowcolumn .navigation_page .utompage{ font-size: 10px; float: left; height: 20px; padding: 0 5px; line-height: 20px; margin: 0 1px 1px 0; } .narrowcolumn .navigation_page a{ background: #fff; border:0px solid #fff; color: #666; } .narrowcolumn .navigation_page a:hover, .narrowcolumn .navigation_page .utompage{ color: #4374b0; background: #fff; border:0px solid #fff; } .narrowcolumn .alignright { float:right; } .narrowcolumn .postmetadata { border-top:1px solid #fff; border-bottom:1px solid #fff; margin:20px 0; padding:10px; } .narrowcolumn .postrss2 a { background:transparent url("images/rss_big.png") no-repeat 0 0; position:absolute; width:80px; height:80px; overflow:hidden; text-indent:400px; line-height:200px; margin:-5px 0 0 400px; } .narrowcolumn .postmetadata li { line-height:23px; padding:0 0 0 20px; } .narrowcolumn .postdatetime { background:transparent url("images/time.png") no-repeat left center; } .narrowcolumn .postcategory { float:left; background:transparent url("images/folder.png") no-repeat left center; margin:0 10px 0 0; } .narrowcolumn .posttag { float:left; background:transparent url("images/tag_blue.png") no-repeat left center; } .narrowcolumn .posttrackback { clear:both; background:transparent url("images/arrow_refresh.png") no-repeat left center; } .narrowcolumn .postedit { clear:both; background:transparent url("images/pencil.png") no-repeat left center; } span.ugr { float:left; width:50px; height:50px; border:0px solid #666; margin:0 3px 3px 0; } .narrowcolumn h3#comments,.narrowcolumn h3#respond { font-size:15px; margin:10px 0; } .narrowcolumn ol.commentlist { border:0px solid #666; border-bottom:none; margin:0 0 20px; } .narrowcolumn ol.commentlist li { border-bottom:0px solid #666; background:#fff; padding:10px; } .narrowcolumn ol.commentlist li.alt { background:#fff; } .narrowcolumn .commentlist .uar,.narrowcolumn .commentlist .uar a { font-size:14px; font-weight:700; color:#333; } .narrowcolumn .spost,.narrowcolumn .commentlist p { clear:both; } .narrowcolumn #comment { width:80%; } My homepage is he Code: tonycai.com As you can see my paragraphs doesn't break a line. Thanks Hi all, I've created a template in CSS and divs, but when someone puts a word like this_is_a_template - with no spaces in it, it breaks the left nav. Is there any way of making sure words break once they get to the width of the leftnav, even when they don't have spaces in them? Cheers. Hi all. Question is in the title really. I have made a <td> a link e.g. the whole <td> rather than just the text within it. It works fine in FF, but only the first <td> in the table works in IE. I have seen a hack/fix for this somewhere, but I cannot find it - google is good, but I can never re-find anything! At the moment I have this CSS Code: Original - CSS Code .tdmenu td a{ border: 1px solid #000000; display: block; } .tdmenu td a:hover{ border: 1px solid #000000; background-color: #FFFFFF; display: block; } .tdmenu td a{ And here is a sample of my HTML HTML Code: Original - HTML Code <table width="120px" border="0" cellspacing="2" cellpadding="2"class="tdmenu" > <tr> <td><a href="Exec">Exec</a></td> </tr> <tr> <td><a href="Updates">Updates</a></td> </tr> </table> <table width="120px" border="0" cellspacing="2" cellpadding="2"class="tdmenu" > <tr> <td><a href="Exec">Exec</a></td> </tr> <tr> <td><a href="Updates">Updates</a></td> </tr> </table> Thanks for your time and any help J Noble Hey guys im updating a site that i originally didnt code, and for some reason any link will have a carrage return or something after it so that the next thing will start on a new line, so if were to put a link in the middle of a paragragh the next word would start on a new line??? what should i be looking for in the css to rectify this. i tried removing all the 'display : block' but that didnt work... thanks I want to display two tables on one line keeping the width of the table. In the past whenever I've wanted two things on the same line I've always floated one left and the other right. I've tried doing this here but the tables have a width of 45% and when they get floated its as if thats ignored. Heres a picture to better explain the situation. http://i52.tinypic.com/2ry1vur.jpg Thanks in advance for all your help. hello, I want the right arrow to be displayed on the same line as the slide show. Any suggestions as to how to do so? below is the CSS and the HTML. Here is the html 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> <script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script> <link type="text/css" href="scrollable.css" rel="stylesheet" /> <script> // execute your scripts when the DOM is ready. this is a good habit $(function() { // initialize scrollable $("div.scrollable").scrollable(); }); </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .leftbutton {width: 30px; float:left; margin-top:30px;} .rightbutton {display:inline;} </style> </head> <body> <!-- "previous page" action --> <a class="prevPage browse left leftbutton"><img src="left.png" /></a> <!-- root element for scrollable --> <div class="scrollable inline"> <!-- root element for the items --> <div class="items"> <!-- 1-5 --> <img src="http://farm1.static.flickr.com/143/321464099_a7cfcb95cf_t.jpg" /> <img src="http://farm4.static.flickr.com/3089/2796719087_c3ee89a730_t.jpg" /> <img src="http://farm1.static.flickr.com/79/244441862_08ec9b6b49_t.jpg" /> <img src="http://farm1.static.flickr.com/28/66523124_b468cf4978_t.jpg" /> <img src="http://farm1.static.flickr.com/164/399223606_b875ddf797_t.jpg" /> <!-- 5-10 --> <img src="http://farm1.static.flickr.com/163/399223609_db47d35b7c_t.jpg" /> <img src="http://farm1.static.flickr.com/135/321464104_c010dbf34c_t.jpg" /> <img src="http://farm1.static.flickr.com/40/117346184_9760f3aabc_t.jpg" /> <img src="http://farm1.static.flickr.com/153/399232237_6928a527c1_t.jpg" /> <img src="http://farm1.static.flickr.com/50/117346182_1fded507fa_t.jpg" /> <!-- 10-15 --> <img src="http://farm4.static.flickr.com/3629/3323896446_3b87a8bf75_t.jpg" /> <img src="http://farm4.static.flickr.com/3023/3323897466_e61624f6de_t.jpg" /> <img src="http://farm4.static.flickr.com/3650/3323058611_d35c894fab_t.jpg" /> <img src="http://farm4.static.flickr.com/3635/3323893254_3183671257_t.jpg" /> <img src="http://farm4.static.flickr.com/3624/3323893148_8318838fbd_t.jpg" /> </div> </div> <!-- "next page" action --> <a class="nextPage browse right rightbutton"><img src="right.png" /></a> </body> </html> Here is the CSS: Code: /* root element for the scrollable. when scrolling occurs this element stays still. */ .scrollable { /* required settings */ position:relative; overflow:hidden; width: 680px; height:120px; /* custom decorations */ border:1px solid #ccc; background:url(/img/global/gradient/h300.png) repeat-x;} /* root element for scrollable items. Must be absolutely positioned and it should have a extremely large width to accomodate scrollable items. it's enough that you set the width and height for the root element and not for this element. */ .scrollable .items { /* this cannot be too large */ width:20000em; position:absolute; clear:both; } /* single scrollable item */ .scrollable img { float:left; margin:20px 5px 20px 21px; background-color:#fff; padding:2px; border:1px solid #ccc; cursor:pointer; width:100px; height:75px; -moz-border-radius:4px; -webkit-border-radius:4px; } /* active item */ .scrollable .active { border:2px solid #000; z-index:9999; position:relative; } I recently relaunched our web site and, trying to stay with the times, use CSS as much as possible for layout purposes. The one place I still use a table for layout is in the top navigation bar, which includes a search form. I would like to eliminate the table and use CSS for styling the top navigation bar, but am not sure how. I want the pages to hold up in IE 5.0+, Mozilla, Netscape 6+, Firefox and Safari and to be tolerable in Mac IE 5.x - a tall order but manageable I think. Can this be done? Am I stuck with a layout table here? Any help is appreciated. You can see an example web page at: http://www.cambridgema.gov/~CDD/ The HTML is in the attached file. source: bluewebpages.com/photography/album3/1 i need help setting the thumbnails which have a block display to line up on the same line. i'm using a program called photostack, which is a light-weight photoblog system. when it spits out the code, how would i center the main div containg all thumbnails? i've tried text-align, negative margins(which worked except that the main photo would display ontop of them because the negative margins involved abs positioning) mainly if someone could point me in the right direction on getting block elements on the same line then i'd be set. i can resolve the later issue. thanks, amory EDIT FIXED - need a float: left; I am trying to create a small personal website. The background, white "content" box, and top banner are exactly as I want them. But, for some reason, the right margin on the "bodytext" gets pushed out too far. This happens in both IE and FF. The horrible green background color is just so you can see how far over it gets pushed. None of the solutions Ive tried so far, works. is the reset stylesheet. is the page specific stylesheet. I hope that someone will be able to suggest a fix. -edit- Forget it. The forums won't let me link you to the page with the problem, and I have no idea how I am supposed to show and ask for help with this restriction. Moderators, please kill my user account. Please realize this question is coming from a new CSSer. I would like to have the text I have in the content area wrap around the box on the right. So when I type more content, the bottom portion will extend below the box. The box will always stay at the top. can someone help me do this? My page By the way, I know it doesn't render properly in FireFox - I was going to ask about that later. hi i have a table that has another small table of a fixed height aligned to the right. what i want is that when i enter text in the larger table, the text should 'flow' around the corner of the table. +----------+----+ +....1.....+..2.+ +..........+----+ +...............+ +---------------+ when i enter text in 1, i want that it wraps it around 2 as well. please tell me how to do it. When a div gets smaller due to window resizing or screen resolution whats the attribute to make the text reformat with it. A div thats not as wide means that the lines of text need to not be as wide..you get the idea..and im not talking about using overflow:auto. This is due on wednesday Heres my main divs Code: #wrap { width:75%; margin-left: auto; margin-right: auto; min-width:700px; } #header {background:url(images/black.png); height:60px; margin-bottom:0px; } /*For Site Title Image*/ .title {float:left; } /*Contains the menu*/ #menu {background:#000000; height:30px; margin:0px; padding-bottom:5px; padding-right:10px; } /*Fix margins/padding*/ .link {float:right; margin-top:0px; background:url(images/gradient.png); height:auto; width:auto; border-right:1px solid #000000; text-align:center; padding:5px; } #floatright {float:right; width:300px; margin:auto; padding-left:10px; border-left:2px double grey; height:350px; background:#000000; } #content { background:url(images/back.png); color:#000000; padding-top:10px; padding-bottom:10px; padding-left:20px; padding-right:20px; height:auto; font-family:Verdana; } this is kind of a crude copy/paste of my current code, but it shows the problem. 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> <title> new document </title> <style> #contentstylesubheader { float: left; padding-left: 16px; height: 53px; padding-right: 30px; padding-top: 15px; } #contentstylesubheaderleft { float: left; font-size: 12pt; font-weight: bold; } #contentstylesubheaderright { text-align: right; position: relative; z-index: 100; float: right; } </style> </head> <body> <div id="contentstylesubheader"> <div id="contentstylesubheaderleft">blahblah</div> <div id="contentstylesubheaderright"> <span id="item_price">blah</span> <a href="#"><img src="../images/buynowbutton.gif" class="imgvalignmiddle padleftmedium padbottomsmall" alt="Add to Cart" /></a><br/> <a href="#"><img src="images/review_sm.png" alt="Review Our Payment Plan" /></a> </div> </div> </body> </html> I need to get my Flash under control, anyone have a solution to control the zindex of a activex flash object via div? thanks I'm trying to resize links on hover but doing so they change their vertical alignment during hover. Is there a way to prevent this ? Basically I just want the text to be bottom aligned and stay that way on hover. "text-align: top" works, but thats not what I want. simple example: CSS: Code: a:link, a:visited, a:active { font-size: 1em; } a:hover { font-size: 1.5em; } HTML: Code: <div> <a href="#">Text</a> </div> I'm having problems getting my text to show up on the same line. I'm not sure what I'm doing wrong. Here is my code: Code: <div id="subtitle"><b>What Personal Information Is Collected?</b> <div style="font-size:7px"><a href="#whatinfo">SEE MORE DETAILS</a></div></div> The "subtitle" CSS is external: Code: #subtitle { font-family:sans-serif, arial, verdana; font-size:9pt; background-color:#cccccc; padding-left:6px; } I don't understand why the "SEE MORE DETAILS" link showing up on a second line? I want it at the end of my subtitle. Thanks for your help in advance. i am trying to do something like: <h6>blah</h6><span class="note">*blah</span> but *blah is appearing underneath the h6 which is fair enough but how do i make it appear on the same line? i cant for the life of me think of a css property that lets me do that? Hello, more issues(!) I'm using "text-decoration: line-through" to cross out retail prices - catalogue style. The trouble is, when the effect is used with certain numbers like "8" and "3", the numbers become unreadable and it looks like we're charging more than the retail price on some products. My boss likes the effect, so I need to find out how to raise the height of the line-through. Does anyone know how I can do this, or any other methods (such as border control) that will be more effective. Many thanks! I am looking for a way (preferably using CSS) to make an I-beam or cursor inside a text field to become invisible. This may be achieved by changing its color to match the bgcolor, by making it invisible altogether, or even simply to get it to stop blinking (when the bg color is black). Any help would be appreciated. |