css

How to use our own fonts in web sites, which is compatible with all users?

I need to use different hi-style fonts in my webpage. But i had fear that, if the user had no such font, then they will be displayed with default font. How to use different new font that should be compatible with all users? ...

Putting an ID on <body> in ASP.NET MVC

I would like my views to be able to specify a class for the <body> tag, which lies in my master page. My first take was to do something like this: <asp:Content ContentPlaceHolderID="BodyClassContent" runat="server"> view-item</asp:Content> However, that would require this in the master page, which doesn't work: <body class="<as...

background color doesn't always show up

I have the following css set up for my page. When the page loads the background color doesn't always take effect. I have to refresh my page once or twice before the color works. Anyone know why? The background-image isn't as tall as the entire page and it's a gradient. So I'm taking the bottom pixel color of the gradient and using t...

DIV equal height within floated "row"

Ok, so I have this code: <div class='layout' style='width: 500px;'> <div class='layout_frame' style='width: 300px;'></div> <div class='layout_frame' style='width: 200px;'></div> <div class='layout_frame' style='width: 100px;'></div> <div class='layout_frame' style='width: 300px;'></div> <div class='layout_frame' style='width: ...

Is there an ideal size for background images?

For example, would a 1x1 image load faster than a 2x2? The size would be smaller, but the browser would have to work twice as much, right? So, is there an ideal size and shape (square vs rectangle) for background images? I know it's probably not too important, but I'm interested to know. Thank you ...

CSS sprites navigation and User with image disabled.....

I made a css menu with css sprites but the problem is with sprite we don't use inline image we use in background only so if images are disabled in browser then nothing will show . any solution for this ? For example : See this menu and turn off images : http://line25.com/wp-content/uploads/2009/css-menu/demo/demo.html (it will not be s...

EMBED tag within container DIV not getting displayed in IE6

Please don't poke me for using IE6 but that's a client's requirement. My question is, I have an EMBED tag that displays a PDF dynamically depending on the user choice which means the first time the page gets rendered there won't be any EMBED tags but will be when the user picks a choice. The problem seems to be that when the EMBED tag ...

Wrapping text around a div

Hi, I have a layout like this: Header div divLeft divRight Footer div divLeft is a bunch of text and divRight is a div with some stuff in it. divLeft is a lot longer and I would like the text to wrap under divright. right now it's just making two columns and there's a lot of white space under divRight. Help? Thanks! ...

How to give sentence case to sentences through CSS or javascript?

How to give sentence case to sentences through CSS or javascript? I've tried these CSS properties but these are different capitalize Transforms the first character of each word to uppercase uppercase Transforms all characters to uppercase lowercase Transforms all characters to lowercase Edit: 19 FEB 2010 is there any option i...

Div does not expand to maximum width

I have the following css class: .CtractLabel { font-weight:bold; padding: 2px; text-align:left; /* width:120px; */ width:150px; float:left; border-bottom:solid 1px #aaaaaa; border-right:solid 1px #aaaaaa; background: white url('../Images/GridHeaderBg.gif') repeat-x bottom; } On my page, I have a a d...

Silverlight GetElementById IE6

Hi, I have an odd error that you guys will hopefully be able to help me out with. I have this code in my silverlight app: private void MainGrid_SizeChanged(object sender, SizeChangedEventArgs e) { double actualHeight = this.MainGrid.ActualHeight; HtmlPage.Document.GetElementById("silverlightControlHost").SetStyleAttribute("height", s...

What is the problem with Visual Studio.Net's "absolute positioning", and how is that problem fixed by CSS's "absolute positioning"?

For years, Visual Studio.NET has offered "absolute positioning" for ASP.NET, whereby you can drag controls onto the designer canvas wherever you want them to be. However, there has always been strong advice not to use that feature. Instead, the common wisdom said you should use "Flow layout", because if you were to use VS.NET's "absolute...

how to set line spacing for html <p>

For html <p>...</p>, how to set the line spacing using style sheet if the text for the paragraph have more then one line? ...

Floating box leaves container coming up short.

I know this is a common question but I just can't seem to get it right. I have tried everything except the one thing that will make this work, including various placements and combinations of clear and overflow settings. Here's my code (stripped down for posting) <style> #message { border:thin red dashed; overflow:hidden; } #mes...

IE8 Borders & Padding - Not rendering like IE7 and other browsers.

IE8 not rendering padding & borders properly when doctype is ste to strict. Any suggestions? With doctype set to loose, the borders and padding are okay, but other bigger problems beyond CSS appear, so we're sticking w/ strict. Any suggestions on where to start to resolve border & padding style discrepancies? ...

wrapped captcha control in a p tag, how to shift it to the right?

wrapped captcha control in a p tag, how to shift it to the right about 50 px? Edit I am using reCaptcha using the .net control. My input elements are to the right of the page by about 50 px. My repactha is rendering left aligned (all the way to the left, so the alignment is off when compared to my other input fields). ...

Jquery Slider spacing fubar on ie7 and i6..

So ive been trying to debug this friggin spacing issue for the last 4 hours.. and I cant friggin solve it!!! If you go to http://myurbanlunchbox.com you will see right away what I am refering to. The image slider has spacing issues, but only in IE6 and IE7.. (as usual). Can anyone point out where im going wrong? ...

Links not showing in firefox & safari

I have kind of a weird problem .. Something that isn't working on ff & safari but IS working on IE on itself is already pretty weird but I can't seem to figure out this problem.. On my site http://www.turnkring-excelsior.be there are links to social media in the top right corner (youtube, facebook and flickr), on IE they are linked, on...

Global onBlur/onFocus

We have, like everyone else, forms all over our web app. So far we've been using the following (or some variation) in most every form element: class="formThingy" onFocus="document.theForm.theField.className='formThingySelected';" onBlur="document.theForm.theField.className='formThingy';" It's a pain. Is there an easy way to do g...

css quick guide for coders

Is there any fast guide for web application programmer regarding CSS. From my experiece, if one coder with no graphic design background but good in css can use div and span to create a nice looking page. any such 'quick guide' available for coder? ...