CSS - Arial Narrow Substitute, Font Embedding, Link Outlines
Hello,
While testing a site in different browsers/systems, I've found the need to have a suitable replacement for Arial Narrow. Since font-stretch doesn't work (not implemented?), I need a widely available substitute. I've thought about font embedding, but all those articles out there with demos, I can't get them to work with Firefox. So I'm guessing Firefox simply doesn't support font embedding? Is there a way to make font embedding work? The other issue I'm having trouble with, how to make the link outlines disappear in IE? I've added :active, :focus { outline: 0 } to my stylesheet, and it works great in Firefox, however, IE insists on displaying an outline on the links. Any advice on these issues? Similar TutorialsIssue resolved using forum search. Thanks for having such great resources - I just had to search for a while. hello. i have a horizontal menu, which contains a static horizontal menu underneath one of the items depending on where you are in the site. so, this box needs to be exactly the same width as the list items and anchors inside of it. the problem is, using Arial, Helvetica, sans-serif, is that in Linux, it ends up being wider than in Win/Mac. Can i either, make the ul automatically the width of the containing list items, or set a linux font of equal width to arial? In the html below I want to make the text more narrow (to gert the letters cloer to each other). I read about Css-property font-strech but I cannot get it more narrow. Could someone help? Or is there another way to achieve this? This is the HTML: 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"> <style type="text/css"><!-- h1 { color: #D16700; font-weight: 700; font-size: 56px; font face: Arial; text-align: left; text-decoration: none; line-height: 66px;} h2 { color: #D16700; font-weight: 700; font-size: 56px; font face: Arial-black; text-align: left; text-decoration: none; line-height: 66px; } h3 { color: #D16700; font-weight: 700; font-size: 56px; font face: Arial-black; text-align: left; font-stretch: ultra-condensed; text-decoration: none; line-height: 66px; } --> </style> </head> <body> <H1>Communication Training</H1> <H2>Communication Training</H2> <H3>Communication Training</H3> </body> </html> Hi, I just can't seem to get my head around this one. I have a website title which appears on every page. The whole title is a link to the index page of the website. I want the second part of the title to be a h1 header with smaller font in a different colour. I also want the whole title to be on one line. I can only seem to get either all the words in the same font, or I can get the two parts to display their different fonts correctly, but they then appear on two lines, one under the other! My page code: <div id="garden-designer-title"><a href="(*website address*)" title="home">Joe Blogs</a><h1 style="display: inline'"><a href="(*website address*)" title="home">Garden Design</a></h1> </div> My stylesheet code: #garden-designer-title { position:relative; left:0px; top:0px; padding: 0; margin: 0; width:526px; height:51px; z-index:7; } #garden-designer-title a { position:relative; font-size: 46px; font-family: verdana, arial, helvetica, sans-serif; color: #009999; font-weight: normal; text-decoration: none; } #garden-designer-title h1 a { display: inline; font-size: 29px; font-family: verdana, arial, helvetica, sans-serif; color: #9482A4; font-weight: normal; text-decoration: none; } Does anyone know what I'm doing wrong?! Many thanks! for my website im using a CSS table-less layout, and up until now ive used the <center> tag to keep the whole website center aligned, however apparently thats now deprecated, is there a substitute in CSS, ive tried text-align:center; it does work for IE but not for firefox. any help appreciated. calpol2004 I have a typical suckerfish men that I am using but on the second level I am putting a left border around each list element. However, for Firefox I used the first-child pseudo selector but that will not work for Internet Explorer 6 and for some reason the alternative I'm using is not working. Here is the layout of my suckerfish menu. Code: <div id="menu"> <ul id="nav"> <li class="option1">Option 1 <ul class="secondlevel"> <li class="first">Option A</li> <li>Option B</li> <li>Option C</li> </ul> </li> <li class="option2">Option 2 <ul class="secondlevel"> <li class="first">Option A</li> <li>Option B</li> </ul> </li> <li class="option3">Option 3 <ul class="secondlevel"> <li class="first">Option A</li> </ul> </li> <li class="option4">Option 4 <ul class="secondlevel"> <li class="first">Option A</li> <li>Option B</li> </ul> </li> </ul> </div> To reference the first child I should be able to call the class called first. So this is what I have and it doesn't work Code: ul#nav li.first { border-left-style: none; } Any help would be greatly appreciated, thanks, teamhonda81 I'm having a problem in IE6 when I make the browser window narrow so that all the images cannot fit horizontally. The page is at: URL In other browsers Firefox win/mac, Safari, things work ok if I make the browser window narrow so that some of the images in the right section (#section1) will not fit. The images get clipped and a horizontal scroller appears. But in IE6/Win, the whole table of images gets dropped down. I thought the issue was related to: Internet Explorer and the Expanding Box Problem URL But trying overflow:hidden; in #section1 did not help. Any help would be greatly appreciated. Thanks- YamaMon Hi, I have a new template, and a new separate menu; the code has been validated on both. I'm having trouble adding the new menu to the new template, replacing the menu that came with the template. What I would like to do is embed it if possible so when I add content I won't have to change the menu on 400 different pages; also this is a nice menu with lots of code in the html. Is it possible to embed a menu from a root file with a small code? If not how do I add the huge code to my template? I have tried putting it on the top but the drop down doesn't work and parts of it are obscured by the content on my page. If I put the menu about half way down my page it works alright, but I need it on the top. (I tried to post the urls below but the forum rules prevent new members from doing so.) I know this is a lot of info, but I hope you can help me, if so I really appreciate it. Thanks, Dave Hello, I'm brand new to this CSS business, so please be gentle! I'm trying to place my AP Div objects inside a table so that their positions are relative to the edges of the table, rather than relative to the edges of the browser window. I'm guessing I need to somehow put the code for the table around the code for the AP Div objects, but I can't work out how it's supposed to look. Any guidance would be much appreciated. Thanks! I'm relatively ignorant about css and html, but I've faked my way along so far. But I've encountered a problem. I designed a style for a blog on LiveJournal, and it looks OK there. (http://www.livejournal.com/users/javajed/). I've also put a small bit of JavaScript in my website to embed my blog there. (http://www.jaredvoss.com/). On my website, the embedded blog is all screwy. All three DIVs should be contained within the scrolling layer, but only two of them are. Originally the sidebar DIV was even hidden behind the layer it's embedded in (I brought it forward using a z-index code). It seems like the sidebar DIV is taking it's position cues from the main body of my site, while the other DIVs are taking their position cues from the layer they're embedded in. I want all three DIVs to be aligned as they are on LiveJournal, and contained within the scrolling layer on my website. Any ideas? I've tried using wrapper divs and container divs (maybe not correctly) without success. Thanks for any help! I used this method because it seems like the most accessible and search-engine friendly. I run into a problem in IE6 and IE7 where the cursor does not turn into a pointer when the mouse is hovered over the image. HTML: Code: <h1 class="header"> <a href="#"><span></span>Header Text</a> </h1> CSS: Code: #header h1.header{ width:163px; height:37px; float:left; position:relative; } #header h1.header a{ float:left; display:block; width:163px; height:37px; } #header h1.header span{ background: url(../images/common/logo.gif) no-repeat; position: absolute; width: 163px; height: 37px; } I feel like there is one style declaration I'm missing, but I cannot figure it out. Hi, I wrote a code that would import some mysql data into my website. Now I want to format that data into a nice table. Table is probably the wrong term since I am trying to avoid HTML. Anyway I was wondering how you can embed CSS into a PHP script. here is my website: dicebaseball dot org The 4/27Bruins0Dragons0 is the data I am trying to make tabular Here is the code that I am trying to embed CSS into: Code: <?php mysql_connect("localhost", "....", "....") or die("Could not connect: " . mysql_error()); mysql_select_db("..."); $result = mysql_query("SELECT * FROM scores") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo $row['game_date']; echo $row['away_team']; echo $row['away_score']; echo $row['home_team']; echo $row['home_score']; ?> I have a site that is designed to include a specific heading and footing on every page so that I can change my header and footer very easily. Problem is, my heading includes the entire <head> portion of the webpage, and doesn't end until it has already started the body. I am a bit old school and have my pages laid out as a table, which starts with my included header and ends with my included footer (the content goes into the "main" table cell opened by the header and closed by the footer). So, I guess I have a couple questions: - Is there any good way to embed page-specific style sheets given these constraints? - Do you think it is worth dividing up my header into two separate includes (e.g. 'header1.php and 'header2.php') so that I can customize the <head> section for each page? I've been making ok progress with CSS (thanks to your help ) but have come up with a problem when wanting to embed a flash movie into my webpage. How do i do it using CSS? the follwing Html code works fine but fails upon validation. Code: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="300> <param name="movie" value="flash/home.swf"> <param name="quality" value="high"><param name="BGCOLOR" value="#A1D7FD"> <embed src="fighter.swf" width="250" height="250" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#A1D7FD"></embed></object> Any help is appreciated. Also - is it a bad idea including small intro flash movies for webpages? any help is appreciated PROBLEM: I create a nice button using the sliding doors technique for rounded corners. But the button displays with 100% width unless I float it. My layout requires that the buttons be inline with the text, so floating won't work. Anyone know an alternative? I wouldn't mind floating but I want the button to show inline with the text. When I use float:left, it removes it from the inline flow. Basically, I want a very modular button that can be used in several different places on a page. In many cases, floating is fine because the mockup has it out of the inline text, but I want to use it there, too. Here's the HTML: <a class="button" href="#"><span>Update Profile</span></a> Here's the css: a.button:link, a.button:visited { background:url(button_right.gif) no-repeat right top; } a.button span:hover, a.button span:active { background:url(button_left_hover.gif) no-repeat right top; } a.button span { background:url(button_left.gif) no-repeat left top; color:#fff; cursorointer; display:block; height:20px; line-height:20px; margin:0 2px 0 0; padding:0 10px; position:relative; white-space:nowrap; } http://tinyurl.com/5llwfl I'm having some problems with this page in particular. Try clicking on one of the Left or Right white image arrows below the main picture. This only occurs in Firefox 2.x. Once you click the link, the content area below "Starting from $278.497" should shift roughly 5 pixels down. I thought it may be related to the dotted link outline that surrounds the image, but that was not the case. I applied styles to get rid of that and there was no changes. I also thought it may be related to a position:relative; bug which this site has been notorious for. I tried making certain divs in that area position:relative to no avail. So to test further I tried an overall #content *{position:relative;} fix which could not fix the position shift, either. I'm not sure what else it could be. And while I do have access to the build of this app, I have not been able to reproduce the issue by downloading all HTML, CSS, and image files locally. Hello Is there a way i can restore my <a href> link back to its original color, that is before the a:visited event, when I click on another link? PS. no Javascript code needed, is their an alternative in css? I have my links defined with a dashed border, but I don't want this on linked images and I'm trying to figure out if I can accomplish this with CSS only without additional markup in my HTML file. Here is a sample file: http://www. shawkey.com/test/imagebordertest.html Any suggestions on how I can get the dashed border to not appear below the image and only appear below the text with just CSS? I have a 'DIV' tag, its css height property is set to 15px. Why is it, that it's not really 15px until I insert "font: 10px Verdana " *** one of the rules? So fi I have: #topSeperate { height: 15px; width: 100%; background-color: #00FF00; font-weight: bold; font: 10pt Verdana; } The div is perfect, but as soon as I remove the font: tag, it grows in height about 4px even though there is no text typed in the 'DIV'. If this doesnt make sense and you need further explaination, Let me know. Hi there, Does anyone know what font this is that is used for text such as "Everything you need to get a professional website online" at the top and below: "Takeaway Website Standard" When I highlight it, it has a black bacground which is unusual. Any ideas? Thanks! |