We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
CSS and tables
lenora
Posts: 60 Forumite
in Techie Stuff
I would like to create a block in which to display my links like this this one is done using a table and the cell have a white border but I would like to scrap the table and use CSS instead I have tried playing around with different things I currently have:
#nav !!
position: absolute;
top: 170px;
left: 648px;
width: 158px;
}
#nav a !!
font-family: Arial,Helvetica,sans-serif;
display: block;
padding: 8px;
color: white;
background: red;
border-bottom: 1px solid white;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid white;
text-decoration: none;
font-size:12px;
}
This places a white line around each link but you cant see the left and right border as the page background is white, anyone have any ideas
#nav !!
position: absolute;
top: 170px;
left: 648px;
width: 158px;
}
#nav a !!
font-family: Arial,Helvetica,sans-serif;
display: block;
padding: 8px;
color: white;
background: red;
border-bottom: 1px solid white;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid white;
text-decoration: none;
font-size:12px;
}
This places a white line around each link but you cant see the left and right border as the page background is white, anyone have any ideas
0
Comments
-
Add some padding to #nav. e.g
#nav !!
position: absolute;
top: 170px;
left: 648px;
width: 148px;
padding: 5px
}
***Don't forget if you need a width of 158px to take the left and right padding off the width, in this case make it 148px.***
You can then add a margin-top and margin-bottom to '#nav a' to spread out your links boxes.
HTH
Bear
Edit: Not sure what the deal is on this site, outputting !! instead of the opening curly brace, but I'm sure you'd already spotted that.Last ciggie - 28/01/2012 :dance:
If you are not paying for it, you're not the customer; you're the product being sold.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.5K Banking & Borrowing
- 253.7K Reduce Debt & Boost Income
- 454.5K Spending & Discounts
- 245.5K Work, Benefits & Business
- 601.5K Mortgages, Homes & Bills
- 177.6K Life & Family
- 259.5K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards