GetDotted Domains

Viewing Thread:
"CSS help"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 29/06/06 at 22:25
Regular
Posts: 19,415
Okay I'm having a CSS problem with my site, I have a bar with links in "block", at the moment the blocks are aligned on the left. How do I go about centering them in the middle?

Thanks in advanced :)


#block {
float:left;
clear:both;
background-color: #DEDECE;
width: 768px;
height:26px;
border-left: #A5A5A5 solid 1px;
border-right: #A5A5A5 solid 1px;
border-bottom: #A5A5A5 solid 1px;
}

#block a {
text-align: center;
width: 90px;
text-decoration: none;
line-height: 26px;
display: block;
float: left;
}

#block a:hover {
text-decoration: underline;
}

#block span {
float: left;
line-height: 25px;
}

____________________

<div id="block">
<a href="test.html" class="pagelink">Page1</a><span>|</span>
<a href="test.html" class="pagelink">Page2</a><span>|</span>
<a href="test.html" class="pagelink">Page3</a><span>|</span>
<a href="test.html" class="pagelink">Page4</a>
</div>

Sun 06/08/06 at 12:04
Regular
Posts: 19,415
Here's a tougher question, one that would test even the most skilled CSS experts.

How would I go about creating a link that has a dotted and not solid underline.

Also why does IE hate dotted CSS? Either solid or dashed it seem, even on pro sites they haven't figured it out. Except flickr.com I think I remember seeing dotted borders on there in IE.
Sat 05/08/06 at 17:56
Regular
Posts: 19,415
Today at 5:55:54PM

Damnit >_< one second out.
Sat 05/08/06 at 17:55
Regular
Posts: 19,415
ah thanks a lot guys :) helps a lot, wondered why they kept looking for a robot.txt file, hmm now I know.

Garin the margin thing came in handy for another problem, I think I was using padding before but if I used a background colour it would have messed it up. Cheers :)

Is this the code to make it strict?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

If so then great, still looks the same :)
Sat 05/08/06 at 16:07
Regular
"Devil in disguise"
Posts: 3,151
Not sure I entirely get your problem...
Make sure your doctype is strict that'll help reduce the differences between FF and IE rendering. And then try using margin-top:5px; on #blog. Margin is applied outside of the content area, not within it.
Sat 05/08/06 at 16:02
Moderator
"Are you sure?"
Posts: 5,000
Machie wrote:
> also is there any way I can work online, it's annoying having to
> design webpages offline. My only worry is that I'll get search
> engines finding my pages and sending people over or caching
> pages while I'm still working on it. Anything I can do?

Search engines should only find your pages if you have a permanent link to the page that they can crawl. What I do is create a directory called newstuff etc. and FTP the content to that directory. Once I'm happy things look right in various browsers etc. I move the data to the live address.

If you want to really make sure SE's don't index it then you should setup a robots.txt file, which all the decent SE's will obey. More info on robots.txt: www.robotstxt.org
Sat 05/08/06 at 15:31
Regular
Posts: 19,415
also is there any way I can work online, it's annoying having to design webpages offline. My only worry is that I'll get search engines finding my pages and sending people over or caching pages while I'm still working on it. Anything I can do?
Sat 05/08/06 at 15:29
Regular
Posts: 19,415
#blog {
float: left;
background: #F2F2F2;
width: 550px;
padding:5px;
text-align:left;
font-family: verdana;
font-size: 13px;
border-bottom: #A5A5A5 solid 1px;
}


I'm having trouble making a space above and below this. I'f I'm to put one on top of the other and want to seperate them I would either use <br /> or <p></p>.

Works fine in IE, but not in FF.

Any help would be appreciated.

----

I'm not sure if it has anything to do with 2 columns I put above this blog code. (these two columns are in the left column of another set of columns, I'm not great with columns).


#menu-left {
width: 275px;
height: 175px;
float:left;
background: #FFFFFF;
padding-right:10px;
text-align: center;
}

#menu-right {
width: 263px;
height: 163px;
float:right;
padding:5px;
background: #FFFFFF;
border-left: #DDDDDD solid 1px;
border-right: #DDDDDD solid 1px;
border-bottom: #DDDDDD solid 1px;
border-top: #DDDDDD solid 1px;
}



Sometimes I wonder if my codding is all messed up because I'm using Dreamweaver 8. And the design view is really messed up but not sure if it's because I have the google search coding in there which breaks the CSS code in the design, but not when it's viewed on webpages.
Thu 06/07/06 at 14:56
Regular
Posts: 19,415
Yay it works, thanks Garin. I tried the first one and it does what I want. As you provided several solutions I'm okay using this one right? I mean I won't find it looking messed up on other browsers etc. I guess I should check. :/

Sorry I didnt post a link, my webhost is down and I couldnt log in to get my password and login. I really should write it down :(

Thanks again Garin, looks perfect.
Thu 06/07/06 at 14:43
Regular
"Devil in disguise"
Posts: 3,151
Simpliest solution, wrap your links in a further div with a defined width. eg

#block div {
width:400px;
margin-left:auto;
margin-right:auto;
}

Another alternative would be to get rid of the block and float properties on the link and span tags, and then apply text-align:center to block. You could then apply padding-left and padding-right to your link tags to get your block effect.
Theres plenty of solutions, I just picked a couple that involved changing the least amount of code.
Thu 06/07/06 at 11:42
Regular
Posts: 19,415
no it's not at the moment but you're right I should put it online so you get a better idea, okay I'll quickly put it up and post a link :) cheers

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Top-notch internet service
Excellent internet service and customer service. Top-notch in replying to my comments.
Duncan
Excellent support service!
I have always found the support staff to provide an excellent service on every occasion I've called.
Ben

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.