CSS - Help With Image Placment And Tag Line
The physical appearance and layout has already been determinted.
I must now make it into a webpage that looks like the design. I know how to do it with tables but I am trying todo it tableless and I am having some problems - because this is my first attempt at it - yes I know I am old school - but I am trying to become new school. Here is the link to the design I have the box for the web page and trying to get the logo image to show up properly in the top right corner and the tag line to show up next to it. I don't know how to do the code box thing - but here is my html: <body> <div id="page"> <div id="header"></div> <div id="tagline">world leaders in spirometry</div> </div> </body> Here is my css: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; text-align: left; background-color: #ffffff; color: #000000; margin-top: 11px; padding: 0; } /*page settings*/ #page { width: 750px; height: 600px; border: 1px solid #5094F9; background-color: #FFFFFF; color: inherit; text-align: left; overflow: hidden; margin: 0 auto; padding: 10px 10px 10px 10px; align: center; } #header { background-image: url(../images/vitalograph_spirometers_logo.gif); background-color: inherit; background-position: "top left"; background-attachment: fixed; background-repeat: no-repeat; padding: 10px 10px 10px 10px; overflow: inherit; } #tagline { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-style: italic; color: #5094F9; display: inline; } Any help is greatly appreciated - and if you could tell me how to do the code ting properly that woud be great - I tried the wrap code # icon, but it only pasted one tag not the whole string. Thanks! I have tried embedding the div tags with no luck and even having the text be defined in the heading id and trying to define it there - but it still doesn't look right. Here is my code: Similar TutorialsI am new to xhtml and am working on my web page i want to use a graphic to split my different areas and the book i was using only showed how to put in a plain line, In .css PHP Code: h2 {border-top:1px solid #4D65A0} I have found a graphic i want to use from the animation factory cd's i have and now im lost as to how to put it in. new line: slash_blue_mw.gif sorry posted in the wrong spot b4 hi, this is my first post so go easy with me! I am trying to use css to make a top navigation bar, with an image to the left and an ul to the right, i want to ul to be in line with the bottom of the image so that it forms a nav bar but i am doing something wrong...! below is what i think is the relevant code and css.... any help appreciated!! If i need to upload the rest of the pages then let me know. i'm coding in php but this bit is all html so i guess that doesnt really matter for now, i'm new to web development, its part of a uni assignment! Code: HTML <div id="header"> <p align="left"> <a href="index.php"> <img src="/images/GATlogo.jpg" width="150" height="150" alt="Home" border="0" /></a> <ul> <li><strong><?php echo "$heading"; ?></strong></li> <li><img src="/images/login.gif" border="0"/><a href=" Login.php">Login</a></li> <li><img src="/images/register.gif" border="0"/><a href=" Register.php">Register</a></li> </ul> </div> Code: CSS #header{ vertical-align: top; text-align: right; border: solid thin #999999; margin: 0px 0px 0px 0px; background: #336699; font-family: MS Trebuchet, MS Verdana, Univers, Helvetica, Arial, sans-serif; color: #ffffff; height: 155px; } #header li { display: inline; list-style: none; padding: 40px; } #header a:link { color: #ffffff; text-decoration: none; } #header a:visited { color: #ffffff; text-decoration: none; } #header a:hover { color: #ffffff; text-decoration: none; } #header a:active { color: #ffffff; text-decoration: none; } Hello all, I am dynamicly creating a table with the following structu Code: <table id="plate_header"> <tr> <th><a class="header_link" href="link">Header 1<img src="arrow"></a></th> <th><a class="header_link" href="link">Header 2</a></th> <th><a class="header_link" href="link">Header 3</a></th> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> </tr> </table> with the following CSS: Code: table { padding: 1em; border: 1px solid #dddddd; } /* end table */ .cell { border: 1px solid #dddddd; } td { padding: 1em; } th { background: #206296; padding: 0 1em; font-weight: bold; color: #ffffff; } a:link.header_link, a:hover.header_link, a:active.header_link, a:visited.header_link { color: #ffffff; } #plate_table td { vertical-align: top; } The problem is in some cases, the <th> is the largest item in that column. So whenever the arrow image appears with it, it will be placed on a new line. How can I force it to be on the same line as the text? I have a menu within my content thus: Code: div class="contentMenu"> <ul> <li> <a href="#" title="Find out more"><img src="images/stories/memories/FamilyLife/thumb/familyFWHarveysBuildingsDorchester.jpg" alt="" /> <span>Family life</span></a> </li> . . . <li> <a href="#" title="Find out more"><img src="images/stories/memories/SightsAndSounds/thumb/sightsMOOsmington1963.jpg" alt="" /> <span>Sights/Sounds</span></a> </li> </ul> </div> I want the menu items not to spill onto the next line when I shrink the browser. I have tried overflow:hidden; but does not stop the last one taking up a new "line". There are 7 menu items across the page. The CSS so far is: Code: .contentMenu { background-color:#FFFFCC; border:1px solid #B9C0F7; margin-bottom:6px; padding:8px 0 5px; } #main .contentMenu ul, #main2 .contentMenu ul { margin:0 auto; overflow:hidden; width:95%; } #main ul, #main2 ul { list-style-position:outside; list-style-type:square; margin:0 0 0 20px; padding:10px 0; } #main ul li, #main2 ul li { margin:0; padding:0 0 0 10px; } .contentMenu li { float:left; list-style-image:none; list-style-position:outside; list-style-type:none; margin:0; text-align:center; width:15%; } .contentMenu a { padding-top:4px; text-decoration:none; } .contentMenu img { border:medium none; height:62px; width:55px; } Of course the meni images need to be evenly spaced across the page. Would appreciate if someone could point me in the right direction. Hi. I'm reasonably new to tableless-design, and i've run into the common problem of aligning one bit of text to the left of a line and another to the right. I have searched the web and have found several means of achieving this, but in my case there is an image combined with a inline list (horizontal menu) that needs to be aligned left, and another combination of text and images to the right. | [image] text .... right-side text | This might seem rather simple, but it becomes more complicated: the entire block needs to be padded on the top in order for the text not to appear cramped up at the top, and the left-margin and right-margin of the image is then set to the corresponding negative values in order for it to still be displayed precisely in the top left corner. I have found this to be the only cross-browser compatible method. All the methods I have experimented with to align the two sides on left and right have either resulted in the image and text to be incorrectly (vertically) aligned or be displayed in different lines, even when the image is not used as part of the alignment-method. Any help or suggestions will be greatly appreciated. Thanx Greetings, I am relatively new to CSS and am using background image bullets. Problem is, in the case of a two line link, the bullet aligns in between the two lines and I need it to align to the top line. Below is the CSS, and attached is a screenshot of the link to better illustrate my predicament. Thanks for any help! li { list-style-type: none; background: url(../images/bullet.gif) no-repeat left; padding: 0 0 0 10px; } I've got two lines of text. Want the spacing the two lines to increase, so I set a line-height. When I do this, not only does it increase space between the two lines, it also increases spacing above the first line (and maybe below the second). How can I increase spacing between the two lines only, without increasing above and below? Thanks! Greetings, I have a class called "header" and I am trying to give it a touch of extra space between it and the next line. All of my headers are just a few words and thus on one line. I tried placing "line-height: 1.5em" in my "header" class and it shows up correctly in Dreamweaver but not in IE. My thought is, because it is only a single line, that class value does not kick in because there is no second line for that class. Is there a way to conrol this in CSS or am I going to have to resort to using a....gulp.....spacer? Thanks in advance! Hi all, I am trying to automate everything on my test website and I have one more angle to cover. In effect, I want to adjust the line-height property (which I can do) based on the number of files within a specific folder (PHP and already done). The more files in the folder, the lower the line-height value must be. This is to ensure if I copy additional files into the folder, then the navigation menu (which is PHP reading files in this particular folder) will alter the CSS line-height property accordingly to ensure it can never exceed a certain height. Sounds wierd? go to www.re3.org.uk (next to the RE3 image, I have a list of hyperlinks which are obtained from files within the folder) My problem, when adjusting the CSS property (which is set as cm in *.css file) in javascript, it doesn't correspond correctly, the line-height property in javascript doesn't appear to be work in cm but some other measurement. Does anyone know how to change what unit of measurement Javascript works in? Or does anyone know what unit of measurement javascript uses when adjusting line-height / line-width values? I want to create a mini-algorithm that works out the appropriate line-height based on the image height (got that already) and the number of files in the folder (got that too) so the menu automatically adjusts to fit. Whew! Thanks for taking the time to read my question I have a row of pictures as nav links, and under them I want to put a row of text stating what each link is Picture Picture Picture Picture Text Text Text Text Each pic is 52px wide, so I made the containers for the text 52px wide. both have left and right margins of 10px (I made the .NavText margin 11 to compensate for the 1px border) yet they don't line up!! What am I missing? Thanks, Brad 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> <meta name="description" content="Canada Carriage - A supplier of great carriages from XXXXXXX." /> <meta name="keywords" content="Horse drawn vehicle, Carriages, Carts, Horse carriages, Horse carts, Coyaltix, Manitoba, Canada, Dealer, Equine, FEI, CDE, Combined Driving Event, Pleasure driving, Competition driving, Custom made, Fine quality, Affordable prices, European manufactured, Drive Canada" /> <meta name="Revisit-After" content="7 Days" /> <meta name="Robots" content="index, follow" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Canada Carriage</title> <link rel="stylesheet" type="text/css" href="LC.css" media="screen" /> </head> <body> <div class="MainCont"> <img class="HomeLogo" src="images/logo.jpg" /> <div class="NavHolder"> <a href="LisaClarkDesigns_About.htm"><img class="ImgNav" src="images/AboutNav.gif" alt="Click here to navigate to the About Lisa Clark Designs page." /></a> <a href="LisaClarkDesigns_Portfolio.htm"><img class="ImgNav" src="images/PortfolioNav.gif" alt="Click here to navigate to the Lisa Clark Designs Portfolio page." /></a> <a href="LisaClarkDesigns_Fees.htm"><img class="ImgNav" src="images/FeesNav.gif" alt="Click here to navigate to the Lisa Clark Designs Fees page." /></a> <a href="LisaClarkDesigns_Contact.htm"><img class="ImgNav" src="images/AboutNav.gif" alt="Click here to navigate to the Lisa Clark Designs Contact page." /></a> <div class="NavText">About</div> <div class="NavText">Portfolio</div> <div class="NavText">Fees</div> <div class="NavText">Contact</div> </div> </div> </body> </html> css Code: body { background-color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px; } .MainCont { width: 800px; margin: 0px auto; padding: 0px; } img.HomeLogo { margin-left: auto; margin-right: auto; margin-top: 200px; margin-bottom: 0px; display: block; } img.ImgNav { border: 1px solid #999999; padding: 0px; margin: 0px 10px 0px 10px; width: 52px; } .NavHolder { margin-left: auto; margin-right: auto; margin-top: 100px; margin-bottom: 0px; padding: 0px; display: block; width: 314px; background-color: orange; } .NavText { padding: 0px; margin: 0px 11px 0px 11px; width: 52px; color: #ffffff; font-size: 12px; float: left; display: inline; background-color: red; } Hello, I use always use the <br /> tag and I just found out in using the clearing of divs like; Code: <div style="clear:both; margin-top:5px"></div> for next line or breaking of line. Is this a good thing to use? Hello, At my blog test site You'll notice the Quote: << Hello World! | Gettin' Closer >> text in the middle. Just as you see it above, I'd like that all on one line, but can't seem to figure out how to do it. Driving me nuts. Anyone? The CSS code controlling that is Code: .alignright { text-align: center; display: inline; } .alignleft { text-align: center; display: inline; } Thanks! Chris i have a series of divs that look like this Code: <div> <div></div> <div></div> </div> <div> <div></div> <div></div> </div> Each of the inner divs use the float attribute but when it comes to the second outer div it doesnt automatically go onto the next line it sort of continues from where the last div left off. Why is this... Hi all, How to go to next line if the width of the content is more than specified width? Thanx/Chandar There must be a better way to accomplish this... I need a line break between the two headers in the page below. As it stands it works in Firefox and IE with <br> tags but this seems sloppy.....Is this what the clear element is for? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <style> * { margin: 0; padding: 0; } body { margin:0; padding:0; background-color:#cccccc; } #wrapper { width: 700px; height: 565px; margin-left:auto; margin-right:auto; margin-top:10px; border: 1px solid #808080; background-color:#ffffff; } #sidebar { width: 123px; height: 565px; float: left; background-image:url(images/sidebar.jpg); } #content { margin-left: 125px; height: auto; width:auto; padding: 30px; font:Arial, Helvetica, sans-serif; font-size: 24px; font-style:oblique; color: #444444; } #01 { position:relative; } #02 { position:relative; margin-top:100px; } #b1w, #b2w, #b3w { position:relative; float:left; height:35px; width:35px; border:1px solid; border-color: #808080; margin-top: 5px; margin-right: 5px; background-color:#ffffff; } </style> <body> <div id="wrapper"> <div id="sidebar"></div> <div id="content"> <div id="01">Header 1</div> <div id="b1w"></div> <div id="b2w"></div> <div id="b3w"></div> <br><br><br> <div id="02">Header 2</div> </div> </div> </body> </html> I was just coding this: and all the links appear on new lines... why is that? ARGH! I cant post links just type this: blumoney. latestdot. net/ plb/ pictures. php without the spaces and enters I need to implement ASP .NET form with few radiobuttons. The RadioButton1.Text is set in .cs file. I would like to configure it so that if text is too long it won't extend to 2 lines, but is clipped and have ellipses. I can't make it work. I read about it should has some nowrap defined and overflow: hidden; text-overflow:ellipsis defined somewhere. The problem is i don't know where! Plz help me! I'm having trouble making the line-height work the way I want to in IE. I set the line-height of the outer container to this tag cloud to 24px, yet on IE it doesn't seem to be working. Any Ideas? Check it out. http://gifdump.com/tags/ Viewed on Firefox Viewed on IE I'm trying to figure out the exact height of a single line of text in units of em. I have a nice tabbed navigation system going with two levels, but the 1.25em that I had estimated isn't exactly correct (I get some misalignment when changing the font size). By putting a character in a div and modifying the height of another <div> next to it, with the font at max size, I managed to come to 1.165em, but this got misaligned at a few lower font sizes. Does anyone know an accurate measurement for this? Or should I just get it close enough for "normal" font sizes? In case that didn't make sense, I'll try to illustrate with some ASCII art: Code: +---DIV---+ +-DIV-+ |some text| | | <- what height should this be to line up perfectly? +---------+ +-----+ |