Jump to content
xisto Community
Sign in to follow this  
epox

Help With A Css Design code optimization

Recommended Posts

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! -_-

Share this post


Link to post
Share on other sites

Scrollbar:

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

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

Bold:
<style>.bold {font-weight: bold}</style><span class="bold">Bolded Text</span>

That should take care of it.

Share this post


Link to post
Share on other sites

H3:

<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).

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

173226[/snapback]


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.

 

padding:0px;margin:0px;

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

 

hth,

 

whyme

Edited by whyme (see edit history)

Share this post


Link to post
Share on other sites

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

.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

Share this post


Link to post
Share on other sites

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

.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

191689[/snapback]

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 :huh:

 

Also

 

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:

 

css:h3 {margin:0;padding0;}

Hope it helps

 

Notice from BuffaloHELP:
Edited as reported.

Edited by BuffaloHELP (see edit history)

Share this post


Link to post
Share on other sites

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 :huh:

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?

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:
h1, h2, h3 { font-size: 200%; }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.