I'm embarrassed to ask this question I have this code on my page from my designer and I want to move it to an external css but I'm getting a brain fart on how to do it. <div style="width:300px;*width:280px;float:left;"> Can someone please help me with this simple but problem the * is screwing me up.
Start by giving your DIV either a class or an ID. Then in your external stylesheet style that class or ID normally. For the *, you'll want to do * html selector {width: 280px;} where selector is the class or ID you declared. My question to you is why the two widths?
I have no idea I payed a designer to try and get this vision I had in my head online but didn't have the time or knowledge to do myself and now since I paid Cheaply I'm trying to clean it up a little. My question to you is could you explain this part here to me like a child for some reason I'm having trouble grasping.
Here's a rough example. <div class="yourclassname"> blah blah blah (whatever is inside this DIV, basically) </div> Code (markup): In your external stylesheet, place this code in there: .yourclassname { float: left; width: 380px; } * html .yourclassname { width: 280px; } Code (markup): Of course, having your complete HTML and CSS to look at would help out a lot more. (Bear in mind that I'm one of the best HTML/CSS coders on the planet - so if there's a problem, I'll find it. Also understand that I'm away from home right now caring for an elderly relative who was just released from the hospotal, so it may be a while before I get back to you with a 100% fixed working example custom tailored to your Web site and its needs.)
Thanks Dan I appreciate the offer but it's a mess and I know it's a mess ... Trying to learn CSS as I go. I'm an old dog who's having all kinds of trouble working my way out of doing simplest thing like nesting tables ( I love nesting tables ).
Well, given that you said the code is a mess, I'd bet to say that your designer did something wrong with the code.
Like I said I paid Cheaply and i get frustrated easy when I see it in my head but can't seem to communicate it to the coder. Maybe once I figure out how I want everything looking I'll do the smart thing and pay an expert such as yourself the BIG money to make it clean html CSS - I'm still nesting and and have some CSS and even <center>'s in there . How much is BIG money anyways for about 20 template pages (not specificly for you but in general)
Depends on the complexity of the job. I have a HTML framework I use called Lycanthrope (which I'm currently in the process of writing an article about before I Open Source it) that uses its own custom stylesheet to produce just about any type of layout imaginable. But the typical Web sites I work on have three types of template pages - the home page, category/section page, and the product/content page (which all use the same overall structure anyway, allowing me to create other templates from them as-needed). The thing about HTML though is that it's a structural markup language, not a presentational one. The first thing I'd do is strip out all the presentational code and get your pages to validate against a Strict DOCTYPE, and then go from there. If you don't mind me asking, how many columns does your layout have?
I know why there are two widths. IE6 is in quirks mode, so it's acting like IE5.5, so the first width is for old IE while the second width is for everyone else. So * html {blah;} will work for now but when I doctype gets stuck up there IE6 will look a little strange (I'm guessing there are quite a few boxes with the width hacks). Funny, I've never seen one with a * before, usually some other character like _ or \.