NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page CSS Questions - Width of an inline element

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-18-2005, 09:02 AM THREAD STARTER               #1 (permalink)
NamePros Regular
 
EricH's Avatar
Join Date: Dec 2004
Posts: 253
EricH is on a distinguished road
 



CSS Questions - Width of an inline element


Is it possible to set the width of an inline element in CSS? For example, the navbar on http://www.w3bids.com uses...

Code:
a.navbar {
	display:inline;
	text-decoration:none;
	text-align:center;
	font-size: 12px;
	background-image:
url('http://www.w3bids.com/templates/SmoothBlue/images/site/nav/buttons/button_off.gif');
	height:75px
	width:100px;
	border-style:none;
	padding:3px;
	margin-left: 0px;
	margin-right: 0px;
}
But, it doesn't actually set the width of each link to 100px for some reason. Now, if I did this with only changing "display" to "block" instead of inline, it would give me the width... but the buttons would be stacked which I obviously don't want. So, is it possible to set the "width" of an inline element using CSS?
????: NamePros.com http://www.namepros.com/programming/70768-css-questions-width-of-inline-element.html

For example, on http://www.txstart.com I used...

Code:
a.startmenu {
	display:block;
	text-decoration:none;
	text-align:left;
	background-color: #FFFBFF;
	width:150px;
	border-style:outset;
	padding:3px;
	margin-left: 0px;
	margin-right: 0px;
}
And it gives me set "button" widths. Is it because I have a "border-style" in the code as well?
EricH is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:26 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger