Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 03-31-2011, 02:23 AM width in <span>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Why the width in style isn't working here for background image?
Code:
.latestlistbar {
        background: #ffffff url(#/images/splitbar.gif) no-repeat;
        width:750px;
        color: #339933;
        height: 20px;
        font-size: 14px;
        font-family: Arial, Tahoma, Verdana;
        font-weight: bolder;
        margin: 2px 0px 10px 0px;
        padding: 0px 0px 0px 10px;
}
HTML Code:
<span class="latestlistbar">

Latest News &nbsp;&nbsp;|&nbsp;&nbsp; <a class="barlink" href="#">Forums</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a class="barlink" href="#">Some text TV</a>

</span>
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
 
Register now for full access!
Old 03-31-2011, 06:27 AM Re: width in <span>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
A span is an inline element so does NOT take a width value.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2011, 08:01 AM Re: width in <span>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
That's not even of its (image) full size. How can I show atleast full background image?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 03-31-2011, 09:47 AM Re: width in <span>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use a block element as the container
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2011, 09:51 AM Re: width in <span>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Just to add.
Quote:
That's not even of its (image) full size
An image element does not expand the content area of a inline element.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2011, 11:19 AM Re: width in <span>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
It worked, but something went wrong. It has added space between it...!!!

From


To


Now, you would have understood me.. You can see that there is a space between the end of </span> and start of <div> box.

How about using <div> with
Code:
display:inline;
Will that work here?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 03-31-2011 at 11:23 AM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 03-31-2011, 11:27 AM Re: width in <span>
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
set the margins to zero.

You should really learn the basics of the W3c Box Model and understand how it works.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-03-2011, 06:35 AM Re: width in <span>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Yep, Sure I'm a 17-years old newbie in css, working as a part-timer for my website.
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 04-03-2011, 08:37 AM Re: width in <span>
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 9,007
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
Kids that were in a figure drawing class I took recently asked me why I was taking the course, I obviously already had experience. I said, "Yes, twenty years plus, but I always need the practice, and there's always the possibility of finding a new way of doing something."

Long story short, if Chris says take another look at the box model, do. It has nothing to do with your level of experience. Do you know how many experienced people still make newbie mistakes from time to time? If you're here seeking help, you can take our advice or leave it, no need to take a mood over it.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 04-03-2011, 11:56 AM Re: width in <span>
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Quote:
Originally Posted by serandfae View Post
Kids that were in a figure drawing class I took recently asked me why I was taking the course, I obviously already had experience. I said, "Yes, twenty years plus, but I always need the practice, and there's always the possibility of finding a new way of doing something."

Long story short, if Chris says take another look at the box model, do. It has nothing to do with your level of experience. Do you know how many experienced people still make newbie mistakes from time to time? If you're here seeking help, you can take our advice or leave it, no need to take a mood over it.

tim
For sure, I'll go through it because I must know the basics of padding and margin and the difference between two..
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 04-05-2011, 08:43 PM Re: width in <span>
Super Spam Talker

Posts: 878
Name: Paul W
Trades: 0
Quote:
Originally Posted by asmalik12 View Post
For sure, I'll go through it because I must know the basics of padding and margin and the difference between two..
Well you're the one wanting others to fix his errors for him and Chris is the man who does most of the fixing - guess who I'd trust.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to width in <span>
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.42636 seconds with 12 queries