May 17, 2008

Help With A Css Design - code optimization

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

free web hosting

Help With A Css Design - code optimization

epox
hello there!, i need somebody tell me how to put a scrollbar into my divs or tables, and how to delete the h3 cellpadding or how to bold a text with css.
thanks a lot! blink.gif

Reply

truefusion
Scrollbar:
CODE

<div style="overflow: auto"></div>
<td style="overflow: auto"></td>


H3:
CODE

<style>
h3 {
padding: 0px
}
</style>


Bold:
CODE

<style>
.bold {
font-weight: bold
}
</style>

<span class="bold">Bolded Text</span>


That should take care of it.

Reply

alexia
Oh , I think you can do it that with JS
Its not Css APartment

Reply

Tyssen
QUOTE(truefusion @ Aug 10 2005, 04:53 PM)
H3:
CODE

<style>
h3 {
padding: 0px
}
</style>


You might also need to set your margin to 0 as well. Also, don't need to specify px (or em or %) if the value is just 0.
As far as bolding text goes, it depends why you're boldening it. If you're boldening a whole paragraph, then you'd use the method Truefusion provided, but if you're only boldening a few words or a phrase for emphasis, you're better off using <strong>your words here</strong>. It will look the same on screen, but it means more for people using screen readers and to search engines (ie is given higher importance).

Reply

epox
thanks truefusion, all that is useful,but with h3 i want to remove all spaces from the layout(padding, margins) and i put padding:0px, and margin:0px, but it is not working, what is wrong?
thanks again!

Reply

whyme
QUOTE(epox @ Aug 11 2005, 01:09 AM)
thanks truefusion, all that is useful,but with h3 i want to remove all spaces from the layout(padding, margins) and i put padding:0px, and margin:0px, but it is not working, what is wrong?
thanks again!
*



by the looks of your coding, it appears
truefusion forgot to place in the ";" (semicolon) and you followed suit, resulting in CSS that cannot be read. Remeber to place a semicolon after all CSS declarations.

CODE
padding:0px;
margin:0px;


The problem may be another thing. It's best if you showed us the code.

hth,

whyme

Reply

reatum
You really don't even need to use h3 tags if you are using css. make a heading class like this
CODE

.heading {
font-size: 18px;
}

or some variation thereof. Then you can call on that with a div tag or any other tag for that matter. One major benefit of doing it this way is that you know how big your text will be in every single browser. h3 tells the browser to figure out how big the font should be.

One thing you might need to do if you are putting this inline is make it float:left so that it doesn't go to it's own line.

hope this helps

Reply

Lozbo
QUOTE(Re_Atum @ Oct 3 2005, 06:53 PM)
You really don't even need to use h3 tags if you are using css.  make a heading class like this
CODE

.heading {
font-size: 18px;
}

or some variation thereof.  Then you can call on that with a div tag or any other tag for that matter. One major benefit of doing it this way is that you know how big your text will be in every single browser.  h3 tells the browser to figure out how big the font should be.

One thing you might need to do if you are putting this inline is make it float:left so that it doesn't go to it's own line.

hope this helps
*


I think the use of h1, h2, h3... is the best way to make a coherent structure that will explain itself even without css, which means that will be legible for screen readers... So you better markup your code right and you would help make the web easier for everybody smile.gif

Also

QUOTE( whyme @ Aug 14 2005, 05:57 PM)
thanks truefusion, all that is useful,but with h3 i want to remove all spaces from the layout(padding, margins) and i put padding:0px, and margin:0px, but it is not working, what is wrong?
thanks again!


I think you can take out the measurement unit (px) from your code... so it will be like this:

CODE

css:
h3 {margin:0;padding0;}


Hope it helps

Notice from BuffaloHELP:
Edited as reported.

 

 

 


Reply

Tyssen
QUOTE(Lozbo @ Oct 4 2005, 11:00 AM)
I think the use of h1, h2, h3... is the best way to make a coherent structure that will explain itself even without css, which means that will be legible for screen readers... So you better markup your code right and you would help make the web easier for everybody smile.gif

That's exactly right. Why would you create a class for a tag that already exists, helps define the type of content and is preferred by search engines?
QUOTE
h3 tells the browser to figure out how big the font should be.

Not if you specify the size for the h3. You can specify the size for any HTML element, you don't have to accept the default size that a browser sets. If you wanted to, you could have your h1, h2, h3 etc. all the same size simply by doing:

CODE
h1, h2, h3 { font-size: 200%; }

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : css code optimization

  1. Problem With Css Code - (3)
  2. Css Resolution Optimization - (6)
    Hey, I've got a CSS sheet that was for some reason optimized for 1171x721. How can I scale that
    down to 1024x768? Or make it so it has no optimization and is just scrollable? Thanks /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Harrison...
  3. CSS Rollover Menu Code - for < a > tags used on HTML pages (5)
    QUOTE(moldboy @ Nov 18 2005, 03:23 PM) ...  I am wondering if you have a particular site in
    mind that would show how? 206171 Hate to add this to a topic about unordered lists, but
    here goes. Maybe this part will get split into its own topic later. I'll ask another mod how to
    do that. ( new guy comment) My Webpage , or click on the bottom link of my signature to go to the
    same site which has css rollover effects. This isn't the exact code that performs the rollover
    on that site, but is from another (handier to acquire) html page on my computer...



Looking for css, design, code, optimization

Searching Video's for css, design, code, optimization
advertisement



Help With A Css Design - code optimization



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE