Go Back   Flash Flash Revolution > Life and Arts > Art and Graphics
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 06-30-2011, 09:40 PM   #1
Quigly
nah
FFR Veteran
 
Quigly's Avatar
 
Join Date: Jan 2008
Location: nah
Age: 29
Posts: 3,506
Default CSS Problem

HEY GUYS.

So I'm in the process of coding for a website I've designed and I'm running into a bit of the problem. In order to code for the top navigation portion, I decided to make an unordered list of all the image parts of the nav (Home, About Us, etc.), and then display that list inline. However when I displayed the list inline I got a gap between each image as shown:



Does anyone know how to get rid of those gaps?
__________________
nah
Quigly is offline   Reply With Quote
Old 06-30-2011, 09:44 PM   #2
fido123
FFR Player
 
fido123's Avatar
 
Join Date: Sep 2005
Age: 32
Posts: 4,245
Default Re: CSS Problem

First of all it would help if you posted the HTML and CSS used in [code] tags. Secondly it looks like the problem is probably your HTML not your CSS. Finally of all from looking of it it seems like you have those buttons aligned with the beginning of the cell containing your main body of text, but that row ends at the same point probably due to the table width which you won't want to change anyway. You just need to put the buttons in a wide enough area. You might just need to move a <blockquote /> tag.
fido123 is offline   Reply With Quote
Old 06-30-2011, 10:00 PM   #3
Quigly
nah
FFR Veteran
 
Quigly's Avatar
 
Join Date: Jan 2008
Location: nah
Age: 29
Posts: 3,506
Default Re: CSS Problem

The only reason why that one button comes down to a second lime is due to those spaces in between the images, without the spaces all the buttons would fit onto one line.

HTML:
Code:
<div id="topnav">
    	<ul>
        	        <li><a href="../home.html"><img src="../images/SAM-Website-Layout-Final_03.gif" width="100" height="53" alt="home nav"></a></li>
			<li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
			<li><a href="../about-us.html"><img src="../images/SAM-Website-Layout-Final_05.gif" width="127" height="53" alt="about us nav"></a></li>
		  	<li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
			<li><a href="../experience.html"><img src="../images/SAM-Website-Layout-Final_07.gif" width="149" height="53" alt="experience nav"></a></li>
			<li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
			<li><a href="../services.html"><img src="../images/SAM-Website-Layout-Final_09.gif" width="116" height="53" alt="services nav"></a></li>
			<li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
			<li><a href="../testimonials.html"><img src="../images/SAM-Website-Layout-Final_11.gif" width="176" height="53" alt="testimonials nav"></a></li>
			<li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
			<li><a href="../press.html"><img src="../images/SAM-Website-Layout-Final_13.gif" width="82" height="53" alt="press nav"></a></li>
                        <li><img src="../images/SAM-Website-Layout-Final_04.gif" width="2" height="53" alt="header divider"></li>
                        <li><a href="../e-news.html"><img src="../images/SAM-Website-Layout-Final_15.gif" width="121" height="53" alt="e-news nav"></a></li>
		</ul> 
	</div>
CSS:
Code:
#topnav	{ width:883px; margin:0 auto; }
#topnav ul li { display:inline; }
__________________
nah
Quigly is offline   Reply With Quote
Old 06-30-2011, 10:03 PM   #4
fido123
FFR Player
 
fido123's Avatar
 
Join Date: Sep 2005
Age: 32
Posts: 4,245
Default Re: CSS Problem

That's not the usual approach I'd take to something like this, especially making the width static since if you use percentages everything scales with the screen. Try making the width in your CSS something like width:80%; .
fido123 is offline   Reply With Quote
Old 06-30-2011, 10:08 PM   #5
Quigly
nah
FFR Veteran
 
Quigly's Avatar
 
Join Date: Jan 2008
Location: nah
Age: 29
Posts: 3,506
Default Re: CSS Problem

I mean this is my first time coding for a site, and it seemed like a logical way to go about it. I'm really only concerned with removing the gaps in between the gaps.
I tried setting a negative margin which got rid of the gaps, but caused everything to shift off center.
__________________
nah
Quigly is offline   Reply With Quote
Old 06-30-2011, 10:38 PM   #6
fido123
FFR Player
 
fido123's Avatar
 
Join Date: Sep 2005
Age: 32
Posts: 4,245
Default Re: CSS Problem

I'd just arrange the buttons in a table. Easiest way to go about it. Everybody bitches about presentational HTML because CSS is apparently the way you should do it, but honestly I really really don't like the CSS approach. I really only use CSS to change an element's default attributes.
fido123 is offline   Reply With Quote
Old 08-7-2011, 12:46 AM   #7
ddrking133
FFR Player
 
ddrking133's Avatar
 
Join Date: Jun 2004
Location: dirty south
Age: 33
Posts: 584
Send a message via AIM to ddrking133 Send a message via MSN to ddrking133
Default Re: CSS Problem

Ew tables. Don't use tables. Please.

Can you post ALL the HTML and CSS for your entire layout.
__________________
[/center]
ddrking133 is offline   Reply With Quote
Old 08-7-2011, 12:50 AM   #8
Emithith
FFR Player
 
Emithith's Avatar
 
Join Date: Sep 2008
Location: London, Ontario, Maple Syrup Land
Age: 28
Posts: 1,784
Default Re: CSS Problem

again, touching the carcass of a dead thread.
Watch the post date.
Emithith is offline   Reply With Quote
Old 08-7-2011, 03:36 PM   #9
ddrking133
FFR Player
 
ddrking133's Avatar
 
Join Date: Jun 2004
Location: dirty south
Age: 33
Posts: 584
Send a message via AIM to ddrking133 Send a message via MSN to ddrking133
Default Re: CSS Problem

Whoops! Didn't see an answer just trying to help, calm down broski
__________________
[/center]
ddrking133 is offline   Reply With Quote
Reply


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

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

Forum Jump



All times are GMT -5. The time now is 11:09 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution